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$. 
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+a_2a_3a_4a_5+\cdots+a_na_1a_2a_3=0$$ 
  then prove that $4 \mid n$.

My work:
By multiplying all the terms, we get,
$$a_1^4a_2^4\ldots a_n^4=1.$$
I think that I will be able to represent $4n$ a power of $1$, but getting no clue. Please help!
I also think that this problem can be done with invariance and extremal principal too. Please help with these approaches too!
 A: $$(-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.$$
A: 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?
A: 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.
A: Another approach with realisation.
The sum of four consecutive summands can be $0,\pm2,\pm4$. If we change the sign of one $a_i$, then the signs of all these summands will change, the other summands will saved. Therefore, one such change either does not change the sum or changes it to $4$ or $8$. From the sequence $++\ldots +$ with the sum $n$ we can go to any other with the help of several such changes, so the modified sum will be $n + 4k$. It can be equal to zero only if $n\equiv0\pmod 4.$
Realisation. Evidently for $n=4$ there is no example.
$n=8: A=++++----$
$n=12: B=++++-+-+----$
$n\equiv0\pmod 8: AA\ldots A$
$n\equiv4\pmod 8: BAA\ldots A$
A: Consider changes in $S=a_1a_2a_3a_4+\cdots+a_na_1a_2a_3$ under the transformations $a_i \mapsto -a_i$.
$\bullet$ If one or three $a_i$'s have the same sign, then $S \mapsto S \pm 4$.
$\bullet$ If two of the $a_i$'s are positive and two negative, then $S \mapsto S$.
$\bullet$ If all four $a_i$'s have the same sign, then $S \mapsto S \pm 8$.
Since $S=0$ initially, after each transformation $4 \mid S$. Applying the transformation $a_i \mapsto -a_i$ whenever $a_i=-1$ leads to the sum $S=n$. Thus, $4 \mid n$. $\blacksquare$
