<s>[INST] Divisibility of a polynomial by another polynomial I have this question: 
Find all numbers $n\geq 1$ for which the polynomial $x^{n+1}+x^n+1$ is divisible by $x^2-x+1$. How do I even begin?
So far I have that  $x^{n+1}+x^n+1 = x^{n-1}(x^2-x+1)+2x^n-x^{n-1}+1,$ and so the problem is equivalent to finding $n$ such that  $2x^n-x^{n-1}+1$ is divisible by $x^2-x+1.$
A solution that I found goes as follows (but I don't understand it!):
Assume that $x^n+1=(x^m-x+1)Q(x).$ The polynomial $x^m-x+1$ has a real root in the interval $(0,1)$ but $x^n+1$ has no positive real roots. So, no such pairs $m,n$ exist.
Any help?
 [/INST] Let $\omega = e^{\frac{i\pi}{3}}$, then $\omega^2 - \omega  + 1 = 0$.
If there is a $n$ such that $x^2 - x + 1 $ divides $P_n(x) = x^{n+1} + x^n + 1$, then 
$$ 0 = P_n(\omega) = \omega^n(\omega+1)+1.$$
$$ \omega^n(\omega+1) = -1.$$
$\omega+1 = \sqrt{3}e^{\frac{i\pi}{6}}$ is a vector of length $\sqrt{3}$. After a rotation it becomes $-1$, a vector of length $1$.
This is absurd.
</s>