Any of the ai's come in exactly 4 terms out of (a1a2a3a4,a2a3a4a5,...,ana1a2a3).

Let the sum be S0. Now just change the sign of any one of the ai. Let the new sum be S1. It is easy to see that 4|(S1-S0)

Now initially if all ai's =1; sum = n

Final sum when some ai's are -1 = 0

thus 4|(n-0) => 4|n