Finding coefficients of a polynomial in several variables. Let $P(x_1, x_2, \ldots, x_n) = (x_1 - x_2)(x_2 - x_3)\cdots (x_{n-1} - x_n)$ be a polynomial in $\mathbb{Z}[x_1, x_2, \ldots, x_n]$. How will this polynomial look like if we write this polynomial in the following form:
$$P(x_1, x_2, \ldots, x_n) = \sum_{0 \leq i_1,i_2, \cdots , i_n\leq n-1\\i_1+i_2 + \cdots +i_n=n-1\\some~other~conditions}c(i_1,i_2,\ldots, i_{n})x_1^{i_1}x_2^{i_2}\cdots x_n^{i_n}?$$
I mean to determine the coefficients $c(i_1,i_2,\ldots, i_{n})$. It is clear that all the coefficients will be either $-1$ or $1$. But how to express these coefficients in terms of $i_1, \ldots, i_n$?
EDIT: "some other conditions" has been put in the range of summation in r.h.s. Now I have some other questions:
Also What should be the exact "some other conditions" on $(i_1, i_2, \ldots, i_n)$ for summation so that the monomial $x_1^{i_1}x_2^{i_2}\cdots x_n^{i_n}$ will appear in the sum ? In one words what is the formula for writing the given polynomial as the sum of monomials ?
It is obvious that $i_1$ and $i_n$ can take values only $0$ or $1$ and all other exponent of $x_i$ can take values only $0, 1$ or $2$. There will be some other restrictions also.
Any help please.
 A: Hint


*

*$n \equiv 0,1 \mod{4}$
$$
c(i_1,i_2,\cdots,i_n) = (-1)^{\sum n \, i_n}
$$

*$n \equiv 2,3 \mod{4}$
$$
c(i_1,i_2,\cdots,i_n) = (-1)^{1+\sum n \, i_n}
$$
Example
For $n=5$ and $n=6$
Proof Sketch
Induction from $n$ to $n+2$
\begin{align}
P(x_1, x_2, \ldots, x_{n+2}) &= \sum c(i_1,i_2,\ldots, i_{n+2})x_1^{i_1}x_2^{i_2}\cdots x_{n+2}^{i_{n+2}}\\
&= (x_{n}- x_{n+1})(x_{n+1}- x_{n+2}) \sum c(i_1,i_2,\ldots, i_{n})x_1^{i_1}x_2^{i_2}\cdots x_{n}^{i_{n}}\\
&= (x_{n}x_{n+1} + x_{n+1}x_{n+2} - x_{n}x_{n+2} -x_{n+1}x_{n+3}) \sum c(i_1,i_2,\ldots, i_{n})x_1^{i_1}x_2^{i_2}\cdots x_{n}^{i_{n}}
\end{align}
Since in the factor
$$
(x_{n}x_{n+1} + x_{n+1}x_{n+2} - x_{n}x_{n+2} -x_{n+1}^2)
$$
the terms having odd index sum has coefficient $(+1)$ and even index sum has $(-1)$, from $n$ to $n+2$ we switch formulas.
Edit Which coefficients are nonzero?
$c(i_1,\cdots,i_n)\neq 0$ iff there exists $a_1,\cdots,a_{n-1}$ which are either $0$ or $1$ such that
$$
i_1 = a_1, \ i_2 = a_2 - a_1 +1 , \ i_3 = a_3 - a_2 +1 ,\cdots , \ i_{n-1} = a_{n-1} - a_{n-2} +1, \ i_n = 1 - a_{n-1}
$$
Clearly there are $2^{n-1}$ choices. Each choice corresponds a coefficient. $a_k=1$ intuitively means choosing the left element in $k$th parenthesis, and $a_k=0$ means the right one.
