TITLE: Find the coefficient of $x^{24}$ in $(1 + x + x^2 + x^3 + x^4 + x^5)^8$
QUESTION [5 upvotes]: I'm not sure how to go about doing this. Do I find the ways to add up to 24 using the exponents with repetition? Is the multinomial theorem useful here? I also have a feeling that generating functions might be useful here, but I can't see how. Any help would be appreciated.

REPLY [17 votes]: $$(1+x+\dots+x^5)^8=\left(\frac{1-x^6}{1-x}\right)^8=(1-x^6)^8(1-x)^{-8}$$
Using the binomial theoerem,
$$
(1-x^6)^8=\sum_{k\ge0}(-1)^k\binom{8}{k}x^{6k}
$$
and using the negative binomial theorem,
$$
(1-x)^{-8}=\sum_{k\ge0}(-1)^k\binom{-8}{k}x^k=\sum_{k\ge0}\binom{8+k-1}{k}x^k
$$
Thus, when we convolve the above two generating functions, the $x^{24}$ coefficient is
$$
\binom{8}{0}\binom{8+24-1}{24}-\binom{8}{1}\binom{8+18-1}{18}+\binom{8}{2}\binom{8+12-1}{12}\\
-\binom{8}{3}\binom{8+6-1}{6}+\binom{8}{4}\binom{8+0-1}{0}
$$
Addendum: If $a(x)=\sum_{n\ge0}a_nx^n$ and $b(x)=\sum_{n\ge 0}b_nx^n$, then the $x^{24}$ coefficient of $c(x)=a(x)b(x)$ is 
$$
\sum_{k=0}^{24}a
_kb_{n-k}
$$
The final answer I wrote then comes from setting $a(x)=(1-x^6)^8$, $b(x)=(1-x)^{-8}$, and realizing that $a_k=0$ unless $k$ is a multiple of 6, so the above can be rewritten
$$
\sum_{\ell=0}^{4}a
_{6\ell}b_{n-6\ell}
$$