0

For fixed $a\ge 2$, find $n$ such that $a^2+a+1$ divides $a^{2n}+a^n+1$.

If the statement is about polynomials (replacing $a$ by an indeterminate $x$), then I would argue by remarking that roots of $x^2+x+1$ are third roots of unity and then would get that all such $n$ are those which are not divisible by $3$. But here, $a$ is an integer greater than $2$, not a complex number.

ters
  • 508

2 Answers2

1

So, by following Peter's idea, $a^3\equiv 1\mod (a^2+a+1)$. Hence $$a^n=\begin{cases} 1 & \text{if} & 3|n, \\ a & \text{if} &n \equiv 1 \mod 3 ,\\ a^2& \text{if} &n \equiv 2 \mod 3 .\end{cases} $$

Hence if $n$ is of the form $3k+1$ or $3k+2$, then $a^{2n}+a^n+1 \equiv 0 \mod (a^2+a+1)$. Otherwise if $n$ is of the form $n=3k$, then $a^{2n}+a^n+1 \equiv 3 \mod (a^2+a+1) $. If we would have $a^{2n}+a^n+1 \equiv 0 \mod (a^2+a+1) $ in this case, then $a^2+a+1|3$, which implies $a^2+a+1 \in \{1,3\}$. The latter is impossible since $a\ge 2$.

ters
  • 508
0

Here is a different take. Write $u_n=a^{2n}+a^n+1^n$. Since $$(x-1)(x-a)(x-a^2)=x^3 - (a^2 +a + 1) x^2 + a(a^2 + a + 1) x -a^3$$ we have $$u_{n+3} = (a^2 +a + 1)u_{n+2} - a(a^2 + a + 1)u_{n+1} + a^3 u_n \equiv a^3 u_n \bmod (a^2 + a + 1)$$ Thus, for $n\ge 0$, $u_n \bmod (a^2 + a + 1)$ is $$ 3, 0, 0, 3a^3, 0, 0, 3a^6, 0, 0\dots $$ since $u_2=a^4+a^2+1=(a^2 - a + 1)(a^2+a+1)$.

Bottom line: $a^2+a+1$ divides $a^{2n}+a^n+1$ iff $3$ does not divide $n$, because $\gcd(a,a^2+a+1)=1$ and $a^2+a+1$ does not divide $3$ since $a\ge 2$.

lhf
  • 216,483