Given (1+x+x2)n=a0+a1x+a2x2+a3x3+a4x4………(1)
Let ω,ω2,ω3 be the cube root unity then 1+ω+ω2=0, and ω3=1, ω4=ω, ω5=ω2.....
For x=xω,(1+ωx+ω2x2)n=a0+a1ωx+a2ω2x2+a3x3+a4ωx4+………(2)
For x=xω2,(1+ω2x+ωx2)n=a0+a1ω2x+a2ωx2+a3x3+a4ωx4+………(3)
Put x=1 in (1),(2),(3) and add to get
3n=3(a0+a3+a6+…)
Multiply (1),(2),(3) by 1,ω2,ω respectively, put x=1 and add to get
3n=3(a1+a4+a7+…)
Multiply (1),(2),(3) by 1,ω,ω2 respectively, put x=1 and add to get
3n=3(a2+a5+a8+…)
∴a0+a3+a6+…=a1+a4+a7+…=a2+a5+a8+…=3n−1