# Number of monic polynomials

Find the number of monic polynomials $p(x)$ with complex coefficients such that degree of $p(x)$ is at most $7$ and all its roots lie in the set {${1,2,3}$}.

I know the definition of monic polynomial here

I've done :

when degree of monic polynomial is $1$ we have $p(x)= x+a$ , in this case we can get $3$ monic polynomials because roots lie in {${1,2,3}$}.

when degree is $2$ , $p(x)=x^2+ax+b$ , in this case we have ? monic polynomials

But I am unable to think further .

Could anyone please help me ?? Any short method would be highly appreciated .(as Im preparing for an exam where we have to answer within $3$ minutes)

Thanks!

(I'm not sure about the tags .)

All those polynomials have the form $$p(x)=(x-1)^m(x-2)^n(x-3)^p$$

That's because when working over the complex number you will always have that the polynomial will split into linear factors.

If you impose the condition that $\deg(p)\leq7$, then this translates into $m+n+p\leq7$

Thus you need to solve $m+n+p\leq7$ in the non-negative integers.

Can you do this?

• Which part don't you understand? The part about the polynomials having that form? the part about translating into the inequality? how to solve the inequality? Meet asdf halfway! Jun 26, 2018 at 7:29
• A consequence of the fundamental theorem of algebra is that every polynomila of degree $n$ over $\mathbb{C}$ has $n$ roots. Hence all of those $n$ roots must be $1,2$ or $3$ counting multiplicities. Also, since your polynomial is monic, you get the representation above. Expanding the brackets gives that the degree is going to be $m+n+p$. But you want this degree to be $\leq 7$ which gives the inequality. The inequality itself can be solved by direct counting
– asdf
Jun 26, 2018 at 8:12
• You also need $0 \lt m+n+p$ to exclude the case $\{0,0,0\}$, since $p(x)=1$ is not a solution. Jun 26, 2018 at 10:12
• Technically, it is a solution, since all of its roots are in $\{1,2,3\}$ because it doesn't have a root outside of this set
– asdf
Jun 26, 2018 at 12:29