Prove $^{6n+2} − ^{6n+1} + 1$ is always divisible by $^2 −  + 1$;  = 1, 2, 3,... How can we prove that
$^{6n+2} − ^{6n+1} + 1$ is always divisible by $^2 −  + 1$;  = 1, 2, 3,...

I attempted to solve this with Mathematical Induction as follows:
Let s(n) = $x^2 - x + 1$ | $^{6n+2} − ^{6n+1} + 1$;  = 1, 2, 3,..
Basic Step
Let n = 1
⇒ $x^2 - x + 1$ | $^8 − ^7 + 1$
I then proved that the remainder is 0 using polynomial long division.
$\frac{^{6n+2} − ^{6n+1} + 1}{x^2 - x + 1}$ = $x^6 - x^4 - x^3 + x + 1$ R 0
∴ s(1) is true
Assumption Step
Assume that s(m) is true
⇒ $\frac{^{6m+2} − ^{6m+1} + 1}{x^2 - x + 1}$ = Q(x) where Q(x) is a polynomial
Inductive Step
To prove that s(m+1) is true
⇒ $\frac{^{6(m+1)+2} − ^{6(m+1)+1} + 1}{x^2 - x + 1}$ = T(x) where T(x) is a polynomial(x) is a polynomial
⇒ $\frac{^{6m+8} − ^{6m+7} + 1}{x^2 - x + 1}$ = T(x)
⇒ $\frac{x^6(^{6m+2} − ^{6m+1}) + 1}{x^2 - x + 1}$ = T(x)

However, I'm unsure of how to proceed from here. I would appreciate it if anyone could help me with this. Thanks!
 A: Let $$x^{6m+2}-x^{6m+1}+1=\lambda(x^2-x+1)$$
$$x^{6m+8}-x^{6m+7}+1=S$$
$$S=x^6(x^{6m+2}-x^{6m+1})+1$$
$$S=x^6(\lambda(x^2-x+1)-1)+1$$
$$S=x^6\lambda(x^2-x+1)-x^6+1$$
Now dividing $S$ by $x^2-x+1$ yields
$$\frac{x^6\lambda(x^2-x+1)}{x^2-x+1}+\frac{1-x^6}{x^2-x+1}$$
$$\frac{x^6\lambda(x^2-x+1)}{x^2-x+1}+\frac{(1+x-x^3-x^4)(x^2-x+1)}{x^2-x+1}$$
A: *

*Finds the roots of $x^2-x+1$; they are complex

*Pick one of them and prove that is a root of $x^{6n+2}-x^{6n+1}+1$; automatically the other one is also a root therefore the two polynomials have common roots, hence the one with lesser number of roots is a factor of the other polynomial.

A: Define the polynomial
$$P_n(x):=x^{6n+2}−x^{6n+1} + 1$$
Observe that, $x=-1$ is not a root of $x^2-x+1=0$, then multiplying both sides of the equation by $(x+1)$, yields:
$$(x+1)(x^2-x+1)=0$$
This implies that, $x^3= -1,\;x≠-1$.
Therefore, making $x^3\equiv -1$, by $\mod x^2-x+1$, we have:
$$
\begin{align}P_n(x)&\equiv x^2\cdot \left(x^3\right)^{2n}-x\cdot \left(x^3\right)^{2n}+1\\
&\equiv x^2-x+1.\end{align}
$$
This completes the proof.

More explicit explanation:
We can rewrite the polynomial $P_n(x)$ as follows:
$$P_n(x):=(x^2-x+1)Q(x)+R(x)$$
where, $Q(x)$ and $R(x)=ax+b$ are polynomials with some real coefficients.
Let $z\in\mathbb C\setminus \mathbb R$ be a root of $x^2-x+1=0$. Since $z≠-1$, multiplication both sides by $(z+1)$ yields $z^3+1=0$. This implies that, $z^3=-1$ and $z\not\in \mathbb R.$
Putting $x=z$ in the original polynomial indentity, we get:
$$
\begin{align}&P_n(z):=\frac {z^3+1}{z+1}Q(z)+R(z)\\
\implies &P_n(z)=0+R(z)\\
\implies &P_n(z)=R(z)\end{align}
$$
Then, using $z^3=-1$, we obtain:
$$
\begin{align}P_n(z):&=z^2\cdot \left(z^3\right)^{2n}-z\cdot \left(z^3\right)^{2n}+1\\
&=z^2-z+1\\
&=0\end{align}
$$
This leads to:
$$R(z)=az+b=0.$$
This means, $a=b=0$. Therefore, $R(x)\equiv 0$.
Because, if $a=0$, then $b=0$. Thus $R(x)\equiv 0$.
Otherwise, if $a≠0$, then $z=-\frac ba \in \mathbb R$ which gives a contradiction.
A: you could use the relationship between S(m) and S(m+1) such that:
$ x^{6m+2} − x^{6m+1} + 1 $ and $ x^6 * (x^{6m+2} − x^{6m+1} )+1 $  if you use the famous trick of +1 -1 in () we get :
S(m+1) = $ x^6 * (x^{6m+2} − x^{6m+1} +1 )/(x^2 −x +1) +(1-x^6) / (x^2 −x +1) $
= $ (x^6 )* S(m) + (1-x^6) / (x^2 −x +1) $
=$ (x^6 )* Q(x) + (-x^4 -x^3 +x +1 ) $ for some Q(x) polynomial
= K(x) polynomial as sum of 2 polynomials
so we get if S(m) is true so is S(m+1) , from the induction it always holds (you already calculated the case S(1) ).
