Can $S_n=a_1a_2+a_2a_3+\cdots+a_na_1=0$ if $a_i=±1$ for $n=28$ and $n=30$? 
Let $$S_n=a_1a_2+a_2a_3+\cdots+a_na_1$$
If $a_i=\pm 1$, can $S_{28}=S_{30}=0$?

My approach: Start from small $n$ if we can see a pattern
For $n=1$:
$S_1=a_1=±1 \neq0$
For $n=2$:
$S_2=a_1a_2+a_2a_1=2a_1a_2=±2 \neq0$
For $n=3$:
$S_3=a_1a_2+a_2a_3+a_3a_1$
Because $a_1a_2$, $a_2a_3$ and $a_3a_1$ are odd numbers and $0$ is an even number, $S_3$ cannot be $0$. (this can be applied to other $S_n$ if $n$ is an odd number)
For $n=4$:
$S_4=a_1a_2+a_2a_3+a_3a_4+a_4a_1=(a_1+a_3)(a_2+a_4)$
However, I can't do the same with $n=6$ and above...
 A: Write $$S_{30}=S_{28} -a_{28}a_1+a_{28}a_{29}+a_{29}a_{30}+a_{30}a_{1}$$
If $S_{30}=0=S_{28}$,
$$0=-a_{28}a_1+a_{28}a_{29}+a_{29}a_{30}+a_{30}a_{1}$$
$$a_{28}(a_{1}-a_{29})=(a_{29}+a_{1})a_{30}$$
But one of $(a_{1}-a_{29})$, $(a_{29}+a_{1})$ is zero, while other is not.
Hence impossible.
A: Hint: Show that if $ S_n = 0$, then $4 \mid n$.
Your work supports this hypothesis, so prove it.
Corollary: $S_{30}$ is never 0.


 Clearly we need $ 2 \mid n$. (Your work hints at this strongly.)


 Suppose that there are $a$ terms of the form $+1$ and $b$ terms of the form $-1$.
 Then, $ n = a + b$, and $ 0 = a - b$.


 What is $ 1^a (-1)^b$ in 2 different ways?
 Thus, show that $b$ is even, so $ 4 \mid n$.

A: I would like to suggest one more approach to show that existence of the solution implies $4|n$.
Define $x_i = a_i a_{i+1}$, obviously $x_i = \pm 1$.
For any choice of signs of $x_i,\dots,x_{n-1}$ you can always find appropriate $a_1,\dots,a_n$.
Now what about the last term $a_n a_1$?
See that $x_1 x_2 \dots x_{n-1} = a_1 a_2^2\dots a_{n-1}^2 a_n = a_1 a_n$ and obviously $x_1 \dots x_{n-1} = \pm 1$.
Now the problem reads
$$
x_1 + \dots + x_{n-1} + x_1 x_2 \dots x_{n-1} = 0.
$$
Solution exists if and only if ($x_1+ \dots + x_{n-1} = 1$ and $x_1 \dots x_{n-1} = -1$) or ($x_1+ \dots + x_{n-1} = -1$ and $x_1 \dots x_{n-1} = 1$).
Obviously, considering only one case suffices.
Suppose, $x_1 \dots x_{n-1} = -1$. This means, we have odd number of $-1$-s, say $2m+1$.
Then the number of $+1$-s is $n - 1 - (2m + 1)$.
The latter means
$$
1 = x_1+ \dots + x_{n-1} = [n - 1 - (2m + 1)] - (2m + 1) = n - 3 - 4m,
$$
thus
$$
n = 4m + 4 = 4(m+1).
$$
