<s>[INST] Number of possible polynomials 
Let $a,b,c,d$ be four integers (not necessarily distinct) in the set $\{1,2,3,4,5\}$. Find the number of polynomials of the form $x^4+ ax^3 + bx^2 + cx +d$ which is divisible by $x+1$.

My Try:
Let $f(x) = x^4+ ax^3 + bx^2 + cx +d$, then $f(-1) = 0$. Thus $1+ (b+d) = c+a$. On counting cases I got 80 permissible cases. Is there a way to solve the above equation $1+ (b+d) = c+a$?
 [/INST] The counting can be a bit simplified using your intermediate result as follows:


*

*You have $a-b+c-d = 1 \Leftrightarrow (a-1) + (5-b) + (c-1) + (5-d) = 9$
So, your question is equivalent to counting the number of integer solutions of 
$$a' + b' + c' + d' = 9 \mbox{ with } a',b',c',d' \in \{0,1,2,3,4\}$$
Now, let the following sink in first by considering the exponents:
This number is the same as the coefficient of $x^9$ in $(1+x+x^2+x^3+x^4)^4$. 
Hence, using


*

*$1+x+x^2+x^3+x^4 = \frac{1-x^5}{1-x}$ and

*$\frac{1}{(1-x)^4} = \sum_{n=0}\binom{n+3}{3}x^n$ you get


\begin{eqnarray*}[x^9]\left(1+x+x^2+x^3+x^4\right)^4
& = & [x^9]\left(\frac{1-x^5}{1-x}\right)^4\\
& = & [x^9](1-4x^5)\sum_{n=0}\binom{n+3}{3}x^n\\
& = & \binom{9+3}{3} - 4\cdot \binom{4+3}{3}\\
& = & 80
\end{eqnarray*}
</s>