(1+x+x2)n=a0+a1x+a2x2+a3x3+a4x4+ …+a2n−1x2n−1+a2nx2n…(1)
Replacing x by x1 in (1), we get (1+x+x2)n=a0x2n+a1x2n−1+a2x2n−2+… +a2n−1x+a2n
Again, replacing x by −x in (1), we get (1−x+x2)n=a0−a1x+a2x2−a3x3+… −a2n−1x2n−1+a2nx2n…(2)
Multiplying (1) and (2), we get (1+x2+x4)n=(a0x2n+a1x2n−1+a2x2n−2+ …+a2n−1x+a2n)×(a0−a1x+a2x2+ …−a2n−1x2n−1+a2nx2n)...(3) [ Note that (1−x+x2)(1+x+x2)=(1+x2)2−x2=1+x2+x4]
Finally, replace x by x2 in (1), we get (1+x2+x4)n=a0+a1x2+…+anx2n+…+a2nx4n…(4)
Now, equating the coefficients of x2n on the right hand sides of (3) and (4), we get a02−a12+a22−a32+…−a2n−12+a2n2=an.