# 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$$?

• You mean $1+b+d=c+\color{blue}{a}$, surely? – J.G. Oct 19 at 16:16

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*}$$

• How and why did you think we should write a as a-1 and -b as 5-b ....? – Zenix Oct 19 at 17:45
• @Zenix Because, that way the variables become all non-negative and have the same range. So, the polynomial which gives the searched for number becomes relatively simple - as you can see. – trancelocation Oct 19 at 17:48

The number of solutions of $$a-b+c-d=1$$ for $$a,b,c,d\in\{1,2,3,4,5\}$$ can be counted as the coefficient of $$x$$ in the Laurent series

$$\left(x+x^2+x^3+x^4+x^5\right)^2\left(\frac{1}{x}+\frac{1}{x^2}+\frac{1}{x^3}+\frac{1}{x^4}+\frac{1}{x^5}\right)^2,$$ which is also the coefficient of $$x$$ in $$\left(\frac{1}{x^4}+\frac{2}{x^3}+\frac{3}{x^2}+\frac{4}{x}+5+4x+3x^2+2x^3+x^4\right)^2,$$ so it is given by $$2\cdot 1+3\cdot 2+4\cdot 3+5\cdot 4+4\cdot 5+3\cdot 4+2\cdot 3+1\cdot 2=2\sum_{k=1}^{4}k(k+1)=80$$ as claimed.