This is something I observed when I was reading the classic Problem-Solving Strategies by Arthur Engel. I liked the way he solved the following problem:
Let $a_1,\ldots,a_n\in\{-1,1\}$ such that $$a_1 a_2 a_3 a_4 + a_2 a_3 a_4 a_5 +\ldots + a_n a_1 a_2 a_3 = 0$$ Show that $4|n$.
The proof is quite simple and beautiful. We just change every $a_i=-1$ into $a_i=1$ and we clearly see that the sum changes by a $0$ a $4$ or an $8$. When we are finished we get $n \equiv 0 \bmod 4$. This has already been proven several times on StackExchange, but I have another question.
I think that $4 | n$ isn't enough for the equality to hold (the case $n=4$ is proof that it doesn't always work; I also worked out $n=12$), however there is a simple pattern which works easily if $8 | n$: one simply takes $a_i=1$ for $i\equiv 1,2,3,4 \bmod 8$ and $a_i=-1$ otherwise.
I am stuck on this for some time now and I can't seem to find any efficient idea. Any ideas are welcome.
Let $n>0$ with $4\mid n$. Let $S\subset \mathbb Z$ be the set of sums that can be achieved by suitably choosing $a_1,\ldots, a_n\in\{-1,1\}$. Let $s=\min\{\,|x|:x\in S\,\}$. Assume $s\ne 0$. As per the proof for the necessary condition, certainly $4\mid s$. By negating $a_4, a_8, \ldots , a_n$ if necessary, we se that $s$ itself (nad not possibly only $-s$) can be achieved as sum.
Define $$b_i=a_ia_{i+1}a_{i+2}a_{i+3}+\ldots+a_{i+3}a_{i+4}a_{i+5}a_{i+6}$$ (with wrap-around of indices understood). Note that $b_i\in\{-4,-2,0,2,4\}$.
If for such $b_i$ we flip $a_{i+3}$, then the sum $s$ changes to $s-2b_i$. By minimality of $s$ we conclude that for all $i$ either $b_i\le 0$ or $b_i\ge s$. As $b_i\le 4\le s$ anyway, we conclude $$\tag1\forall i\colon (b_i\le 0\lor b_i=s=4) $$ If $b_i=4$ then $b_{i+1}$ differs by two summands, hence $b_{i+1}\in\{2,4\}$. As $(1)$ disallows $b_{i+1}=2$, we can improve $(1)$ to $$\tag2 \forall i\colon b_i\le 0\;\lor\;(s=4\land \forall i\colon b_i=4 )$$ In the first case we find $4s=\sum b_i\le 0$, contradiction. In the second case we find $4s=\sum b_i=4n$, so $n=s=4$.
Conclusion. If $4\mid n>4$ then the sum $0$ can be achieved.