IMO 1985 LL IRE40

Each of the numbers x1, x2, . . . , xn equals 1 or −1 and

IMO 1985 LL IRE40

Origin: IRE

Problem

Each of the numbers x1, x2, . . . , xn equals 1 or −1 and x1x2x3x4 + x2x3x4x5 + \cdot \cdot \cdot + xn−3xn−2xn−1xn +xn−2xn−1xnx1 + xn−1xnx1x2 + xnx1x2x3 = 0. Prove that n is divisible by 4.