# Find $S=\sum\sum\sum x_{i}x_{j}x_{k}$ where $x_{i}=-x_{n-i+1}$ for $1\leq i\leq n$

Suppose that $x_{1},x_{2}.....x_{n},(n>2)$ are real numbers such that $x_{i}=-x_{n-i+1}$ for $1\leq i\leq n$. Consider the sum $S=\sum\sum\sum x_{i}x_{j}x_{k}$, where the summation are taken over all $i,j,k: 1\leq i,j,k\leq n$ and $i,j,k$ all are distinct. Then find $S$.

I found this question on ISI's Test of Math@10+2 book where solution is not given. I tried but couldn't arrive at answer. I'm preparing for the exams so please help me with this.

Define $a=\sum_j \sum_k x_j x_k$ then $$\sum_i \sum_j \sum_k x_i x_j x_k =\sum_i x_i \sum_j \sum_k x_j x_k =\sum_i x_i a =a\sum_i x_i =a\cdot\frac{1}{2}\cdot \sum_i (x_i +x_{n-i+1} )=a\cdot \frac{1}{2}\cdot \sum_i 0 =0.$$
Consider the polynomial $p(x)$ having $x_{1},x_{2},\dots,x_{n}$ as roots: $$p(x)=(x-x_1)(x-x_2)\cdots(x-x_n)$$ Then $S=\sum\sum\sum x_{i}x_{j}x_{k}$ equals $\pm 3!$ times the coefficient of $x^{n-3}$ in $p(x)$.
If $n=2m$ is even, then $$p(x)=(x^2-x_1^2)(x^2-x_2^2)\cdots(x^2-x_m^2)$$ Thus, $p(x)=q(x^2)$ contains only terms in even powers and so $S=0$ because $n-3$ is odd.
If $n=2m-1$ is odd, then $x_m=0$ and $$p(x)=x(x^2-x_1^2)(x^2-x_2^2)\cdots(x^2-x_{m-1}^2)$$ Thus, $p(x)=xq(x^2)$ contains only terms in odd powers and so $S=0$ because $n-3$ is even.