Generating function, finding coefficient (decomposing) I just started learning about generating functions, and there is a problem that I have the solution to, but I'm wondering if there is a better general method to solve problems of that kind.
If I want to find the coefficient of $x^8$ in 
$$\left( 1+x+x^2+x^3+x^4 \right) \sum_{k=0}^{\infty} (-1)^k {-2 \choose k} x^k, $$
is there a better method than to decompose it as
$${-2\choose 8}-{-2\choose 7}+{-2\choose 6}-{-2\choose5}+{-2\choose4}$$
$$={9\choose8}+{8\choose7}+{7\choose6}+{6\choose5}+{5\choose4}$$
$=35$?
It is the suggested method in the literature, but it seems to me there should be a better way, since this method would take a lot of time if the coefficient was, for example, the coefficient of $x^{20}$ or larger.
Edit
I found a somewhat similar thread here, and tried to apply that method, but that gives me the wrong answer. That method dealt with partitions, so that in my case the term $x^8$ can arise from $x^4 \cdot p(4,2)x^4, x^3 \cdot p(5,2)x^5, x^2 \cdot p(6,2)x^6, x \cdot p(7,2)x^7$ and $1\cdot p(8,2)x^8.$
Counting all such partitions gives me the answer 25, where it should be 35...

You could try:
$\begin{align*}
(1 + z + z^2 + z^3 + z^4) \sum_{k \ge 0} (-1)^k \binom{-2}{k} z^k
  &= \frac{1 - z^5}{1 - z} \cdot (1 - z)^{-2} \\
  &= (1 - z^5) \cdot (1 - z)^{-3} \\
  &= (1 - z^5) \cdot \sum_{k \ge 0} (-1)^k \binom{-3}{k} z^k \\
  &= (1 - z^5) \cdot \sum_{k \ge 0} \binom{k + 2}{2} z^k
\end{align*}$
so that:
$\begin{align*}
[z^8] (1 + z + z^2 + z^3 + z^4) \sum_{k \ge 0} (-1)^k \binom{-2}{k} z^k
  &= [z^8] (1 - z^5) \cdot \sum_{k \ge 0} \binom{k + 2}{2} z^k \\
  &= \binom{8 + 2}{2} - \binom{3 + 2}{2} \\
  &= 35
\end{align*}$
