<s>[INST] Find the coefficient of $x^{16}$ in $(1 + x + x^2 + x^3 + x^4 + x^5)^4$ We are supposed to find the coefficients of it, I wanted to know if my approach is right here. The final answers seems a bit iffy.
$$(1+x+\dots+x^5)^4=\left(\frac{1-x^6}{1-x}\right)^4=(1-x^6)^4(1-x)^{-4}$$
Using the binomial theoerem, I got the following:
$$
(1-x^6)^4=\sum_{k\ge0}(-1)^k\binom{4}{k}x^{6k}
$$
and using the negative binomial theorem,
$$
(1-x)^{-4}=\sum_{k\ge0}(-1)^k\binom{-4}{k}x^k=\sum_{k\ge0}\binom{4+k-1}{k}x^k
$$
So the $x^{16}$ coefficient is
$$
\binom{4}{0}\binom{8+16-1}{16}-\binom{4}{1}\binom{8+10-1}{10}+\binom{4}{2}\binom{8+4-1}{4}\
$$
$$
 = 1(245157)-4(19448)+6(330)\
$$
$$
= 245157-77792+1980\
= 169345
$$
Not too sure if I did this right. I think my math may be off somewhere but can't figure out where.
 [/INST] A monomial giving a contribution to degree 16 must be of the form
$$x^{a_1}\cdot x^{a_2}\cdot x^{a_3}\cdot x^{a_4}$$
with $a_i <6$ and $a_1+a_2+a_3+a_4=16$.
Suppose  $a_1 \geq a_2 \geq a_3 \geq a_4$, then you have only five possibilities: $(5,5,5,1)$, $(5,5,4,2)$, $(5,5,3,3)$, $(5,4,4,3)$ and $(4,4,4,4)$.
The coefficient of $x^{16}$ equals the cardinality of the set composed by these vectors and the ones obtained permuting their coordinates.
It is easy to prove that this cardinality is equal to:
$$\binom{4}{3}+2\binom{4}{2}+\binom{4}{2}+2\binom{4}{2}+1=35$$
</s>