Prove that $x^{3m}+x^{3n+1}+x^{3p+2}$ is divisible by $x^2+x+1$ in ring $ {\displaystyle \mathbb {R}}$$[x]$ where $m, n, p \in {\displaystyle \mathbb {N}}$
I have tried to use factor theroem to write down $x^{3m}+x^{3n+1}+x^{3p+2}$ as a product of $x^2+x+1$ and something. But I cannot find the second factor.
Thanks in Advance.
Note: $$\frac{x^{3m}+x^{3n+1}+x^{3p+2}}{x^2+x+1}=\frac{x^{3m}-1+x^{3n+1}-x+x^{3p+2}-x^2+(x^2+x+1)}{x^2+x+1}=\\ \frac{(x^{3m}-1)+x(x^{3n}-1)+x^2(x^{3p}-1)+(x^2+x+1)}{x^2+x+1}.$$ And: $$x^{3k}-1 \equiv 0 \pmod{x^2+x+1}, k\in \mathbb N.$$