<s>[INST] Coefficient of $x^{12}$ in $(1+x^2+x^4+x^6)^n$ I need to find the coefficient of $x^{12}$ in the polynomial $(1+x^2+x^4+x^6)^n$.
I have reduced the polynomial to $\left(\frac{1-x^8}{1-x^2}\right)^ n$ and tried binomial expansion and Taylor series, yet it seems too complicated to be worked out by hand.
What should I do?
 [/INST] $(1+x^2+x^4+x^6)^n = (1+x^4)^n(1+x^2)^n$
the $r^{th}$ term in first series: ${n \choose r} x^{4r}$
the $l^{th}$ term in second series: ${n \choose l} x^{2l}$
so we have $4r+2l = 12 \implies r=0, l=6; r=1, l=4; r=2, l=2; r=3, l=0$
So we have coefficient:  ${n \choose 0}{n \choose 6} +{n \choose 1}{n \choose 4} + {n \choose 2}{n \choose 2} + {n \choose 3}{n \choose 0}$
</s>