Divisibility of polynomial 
Prove that: 
  $(x^2+x+1) \mid (x^{6n+2}+x^{3n+1}+1) $ and 
  $(x^2+x+1) \mid (x^{6n+4}+x^{3n+2}+1) $.

I saw proof in book with third roots of unity but i didn't understand it, so i want to see other solution but i dont have idea for that.

Hint $\ {\rm mod}\ x^2\!+\!x\!+\!1\!:\,\ 0\equiv (x^2\!+\!x\!+\!1)(x\!-\!1) \equiv x^3-1\,\Rightarrow\,\color{#c00}{x^3} \equiv 1\,\Rightarrow\, \color{#c00}x^{\color{#c00}3n}\equiv 1\,\Rightarrow\,x^{6n}\equiv 1$
Substituting in both $\ x^{3n},x^{6n}\equiv 1\,$  shows they're $\,\equiv x^2\!+\!x\!+\!1\equiv 0,\ $ using also $\,x^4=x\cdot \color{#c00}{x^3}\equiv x\,$ 
Remark $ $ Why does integer congruence arithmetic ("modular" arithmetic) extend to polynomials? Simply because the proofs of the basic congruence laws (sum and product rules) work universally, i.e. they use only basic ring laws (distributive,commutative,associative), so the proofs remain valid in any commutative ring. This universality becomes clearer when one studies abstract algebra, which studies more structural versions of these ideas (ideals & quotient rings, a.k.a. residue rings).
