Let $a_1,a_2,\cdots,a_n$ be $n$ numbers such that $a_i$ is either $1$ or $-1$.If $a_1a_2a_3a_4+\cdots+a_na_1a_2a_3=0$ then prove that $4\mid n$.

$$(-1)^x \cdot 1^{n-x}=a_1^4a_2^4\ldots a_n^4=1$$ As a result, $$2\mid x.$$

Since $$a_1a_2a_3a_4+a_2a_3a_4a_5+\cdots+a_na_1a_2a_3=0$$ we have, $x = n-x$

Thus $$4\mid n.$$


Hint 1 Each term you add is either $+1$ or $-1$. Since they add up to $0$, it must be an even number of terms. This tells you that $n$ is even.

[If this is not clear, what happens if you add an one to each particular term].

Hint 2 You know already that $n$ is even, and that $\frac{n}{2}$ terms (not a's) have to be $1$ and the other half must be $-1$.

In order for $a_ia_{i+1}a_{i+2}a_{i+3}=1$ an even number of $a_i, a_{i+1}, a_{i+2}, a_{i+3}$ must be $-1$.

In order for $a_ia_{i+1}a_{i+2}a_{i+3}=-1$ an odd number of $a_i, a_{i+1}, a_{i+2}, a_{i+3}$ must be $-1$.

So in total, the number of $-1$ which appears as $a_i$ in your expression have the same parity as $\frac{n}{2}$.

How many times does each $a_i$ appear? Can you finish the problem from here?


All summands are either $1$ or $-1$. Since their sum is equal to $0$ the number of summands $1$ is equal to the number of summands $-1$. The product of all summands is $1$. This means that the number of summands $-1$ is even.