TITLE: Let $P(x)=(x-1)(x-2)(x-3)$.For how many polynomials $Q(x)$ does there exist a polynomial $R(x)$ of degree 3 such that $P(Q(x))=P(x).R(x)?$
QUESTION [5 upvotes]: Let $P(x)=(x-1)(x-2)(x-3)$.For how many polynomials $Q(x)$ does there exist a polynomial $R(x)$ of degree 3 such that $P(Q(x))=P(x).R(x)?$

Let $R(x)$ be a third degree polynomial $ax^3+bx^2+cx+d=0$
In $P(Q(x))=P(x).R(x)$,RHS is a sixth degree polynomial,so LHS must also be a sixth degree polynomial,
So $Q(x)$ must be a quadratic polynomial(let us say $ax^2+bx+c=0$)
But i dont know how to argue further and solve further.Please help me.Thanks.

REPLY [8 votes]: Hint: If $P(Q(x)) = P(x) \cdot R(x)$ for all $x$, then we must have: 
$$P(Q(1)) = P(1) \cdot R(1) = 0$$ $$P(Q(2)) = P(2) \cdot R(2) = 0$$ $$P(Q(3)) = P(3) \cdot R(3) = 0$$
Since the zeros of $P$ are at $1,2,3$, we must have $Q(1),Q(2),Q(3) \in \{1,2,3\}$. 
For each of the $3^3 = 27$ ways you can assign values to $Q(1)$, $Q(2)$, and $Q(3)$, there is exactly one possible polynomial $Q(x)$ with degree $\le 2$. How many of these result in $Q(x)$ being a quadratic polynomial (i.e. not linear or constant)?