# Polynomial counting problem

Problem:How many cubic (i.e., third-degree) polynomials $$f(x)$$ are there such that $$f(x)$$ has nonnegative integer coefficients and $$f(1)=9$$?

My take: Let the polynomial be $$ax^3+bx^2+cx+d$$ which means $$f(1)=a+b+c+d = 9.$$ Therefore the number of solutions is $$\binom{12}{3}=220.$$

But however, this is wrong, so where did I go wrong?

• You must make sure that a is always greater than or equal to 1 for the polynomial to be cubic – Samyak Jha Jul 28 '20 at 7:31
• So I let $a' = a+1, b' = b+1, c' = c+1$ which means that a' will never be negative. – Michael Li Jul 28 '20 at 7:56
• No, just $a'=a-1$........... – Aqua Jul 28 '20 at 8:26

If $$a=0$$ is allowed, your formula is correct. Since you say that it's wrong, it seems that it must be $$a>0$$. Therefore, you are counting the number of ways to choose $$4$$ positive integers $$a$$, $$b+1$$, $$c+1$$ and $$d+1$$ such that their sum is $$a+(b+1)+(c+1)+(d+1)=9+3=12$$. This is equivalent to placing $$3$$ bars at the $$11$$ different places between $$12$$ stars, so the number you are looking for is $$\binom{11}{3}=165$$