I need to find a coefficient of $x^{21}$ inside the following expression:
$$(x^{2} + x^{3} + x^{4} + x^{5} + x^{6})^{8}$$
I think the only way (using generating functions) is to express the parentheses content with a generating function.
The generating function for the $(1, x, x^{2}, x^{3}, ...)$ sequence is equal to $\frac{1}{1-x}$.
However, well...the expression at the top is not infinite, so I can't really express it as a generating function.
How can I do this?
Hint Use a finite geometric series:
$$x^2 + \ldots + x^6 = x^2 \cdot \frac{1-x^5}{1-x}$$
and now you are looking for $$\left[x^{13}\right] \left(1-x^5\right)^8 \cdot \frac{1}{(1-x)^8}$$