Find all positive integers $n > 1$ such that the polynomial $P(x)$ belongs to the ideal generated by the polynomial $x^2 +x +1$ in $\Bbb Z_n[x]$ 
Find all positive integers $n > 1$ such that the polynomial $x^4 + 3x^3 + x^2 + 6x + 10$ belong to the ideal generated by the polynomial $x^2 + x + 1$ in $\Bbb Z_n[x]$.

My attempt: I was using the Division Algorithm 
$$P(X)= X^4 + 3x^3 + X^2 +6X + 10 = (X^2 + x + 1)( x^2 + 2x -2) + (6x + 12).$$
Here I got the remainder $6x + 12$ not equal to $0$, so $P(x)$ is irreducible over $\Bbb Z_n[x]$ because it cannot be factored into the product of two non-constant polynomials.
My thinking is that $\Bbb Z_3[x]$ is only the satisfied  $x^2 + x + 1$ 
$$(1)^2 + 1 + 1 =3$$ and we if we divide $3/3 =1$ and remainder $= 0$.
Therefore $3$ is the only positive integer $n > 1$ such that the polynomial $P(x)$ belong to the ideal generated by the polynomial $x^2 + x + 1$ in $\Bbb Z_n[x]$.

Is my answer is correct or not? I would be more thankful to rectifying my mistake.


Hint $\ 6x\!+\!12 = 0\,$ in $\,\Bbb Z_n[x]\iff  6=0=12\in \Bbb Z_n\!\iff n\mid 6,12\iff n\mid (6,12) = 6.$
