Solution:
Key idea: Here ω is a complex cube root of unity (for ω=1 the sum would be 3). If n is not a multiple of 3, it leaves remainder 1 or 2 when divided by 3. In each case use ω3=1 and 1+ω+ω2=0. Below, p≥0 is an integer.
Step 1 — Case: n leaves remainder 1. Write n as 3p+1.
Then 2n is 6p+2:
1+ωn+ω2n=1+ω3p+1+ω6p+2=1+(ω3)pω+(ω3)2pω2=1+ω+ω2=0
Step 2 — Case: n leaves remainder 2. Write n as 3p+2.
Then 2n is 6p+4, which we write as 3(2p+1)+1:
1+ωn+ω2n=1+ω3p+2+ω6p+4=1+ω2+(ω3)2p+1ω=1+ω2+ω=0
Step 3 — Another way (G.P. sum). The three terms 1,ωn,ω2n form a G.P. with common ratio ωn, and ωn=1 because n is not a multiple of 3. The sum of a G.P. of three terms is
1+ωn+ω2n=ωn−1(ωn)3−1=ωn−1(ω3)n−1=ωn−10=0
Hence 1+ωn+ω2n=0 whenever n is not a multiple of 3.