<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] Here is just a standard trick from generating functions using
$$\frac 1{(1-y)^n} = \sum_{k=0}^{\infty}\binom{k+n-1}{n-1}y^k$$.
To simplify the expressions set
$$y=x^2\Rightarrow \text{ we look for }[y^6]\frac{(1-y^4)^n}{(1-y)^n}$$
Hence, for $n\geq 1$ you get
\begin{eqnarray*}[y^6]\frac{(1-y^4)^n}{(1-y)^n}
& = & [y^6]\left((1-y^4)^n\sum_{k=0}^{\infty}\binom{k+n-1}{n-1}y^k\right) \\
& = & [y^6]\left((1-ny^4)\sum_{k=0}^{\infty}\binom{k+n-1}{n-1}y^k\right) \\
& = & \boxed{\binom{6+n-1}{n-1} - n\binom{2+n-1}{n-1}}
\end{eqnarray*}
</s>