0

Prove for all odd $n \in \mathbb{Z}$: $a^{3(n+1)^2+1} \equiv a$ mod $21$.

I started this way: $21 = 3*7$ and $gcd(3,7) = 1$. So \begin{cases} x \equiv a^{3(n+1)^2+1} \, \text{mod} \, 7 \\ x \equiv a^{3(n+1)^2+1} \, \text{mod} \, 3 \end{cases} I was trying to use following theorem to solve the equation with mod $3$: $a^p \equiv a$ mod $p$ with $p$ a prime number. But I have no idea how to solve the first equation (the one with mod $7$) and how to prove that $n$ has to be an odd number.

Thanks in advance!

Kabouter9
  • 418

2 Answers2

1

If $n$ is odd then $n+1$ is even and $4|(n+1)^2$ and $12|3(n+1)^3$ and $3(n+1)^3 +1\equiv 1\pmod {12}$. (Let $3(n+1)^3 + 1 = 12k + 1$

By Fermat's little theorem $a^{3(n+1)^2+1} = a^{12k}a\equiv 1^{2k}a \equiv a$ if $7\not \mid a$ and if $7|a$ then $a^{3(n+1)^2+1}\equiv 0 \equiv a\pmod 7$.

Likewise $a^{3(n+1)^2+1} = a^{12k}a\equiv 1^{4k}a \equiv a$ if $3\not \mid a$ and if $3|a$ then $a^{3(n+1)^2+1}\equiv 0 \equiv a\pmod 3$

So $a^{3(n+1)^2 +1}\equiv a \pmod {3,7}$ if $n$ is odd.

And since $a^{3(n+1)^2+1} \equiv a\pmod 3$ and $a^{3(n+1)^2+1} \equiv a \pmod 7$, then $a^{2(n+1)^3+1}\equiv a \pmod {3*7}$ by the Chinese remainder theorem.

That is to say: $a\equiv a\pmod {21}$ is certainly a solution to $x\equiv a\pmod 3$ and $x\equiv a\pmod 7$ because $a \equiv a \pmod{anything}$, and CRT says that is the only solution $\mod 21$.

fleablood
  • 124,253
0

$2\mid n\!+\!1\Rightarrow\, 1\!+\!3(n\!+\!1)^2 = \color{#0a0}{1\!+\!6k},\,$ so by below Lemma with $\, p,q = 3,7\,$ we conclude

$\begin{align} &3\!-\!1,7\!-\!1\mid 6k\, \Rightarrow\, 3\cdot 7\mid a\,(a^{\large 6k}-1) = a^{\large \color{#0a0}{1+6k}}-a\\[.6em] {\bf Lemma}\ \ p\neq q\ \text{primes }\ \&\ \ &\color{#c00}{p\!-\!1,\,q\!-\!1\mid K}\,\Rightarrow\, p\cdot q\mid a^n(a^K\! - 1)\ \text{ for all }\,a\ \&\ n>0 \end{align}$

Proof $\ $ See this answer (hint: work mod $\,p\ \&\ q$ and apply Euler / Fermat when $\,a\not\equiv 0$)

Remark $\ $ Since you already know little Fermat, it is clearer (and just as simple) to prove the general linked theorem vs. this special case $\,p,q = 3,7$. Doing so yields a much more general result, e.g. below are some special cases in prior questions:

$\quad$ $24\mid a^3(a^2-1)$, $ $ and $ $ $40\mid a^3(a^4-1)$, $ $ and $ $ $88\mid a^5(a^{20}-1)$, $ $ and $ $ $6p\mid a\,b^p - b\,a^p$

Bill Dubuque
  • 272,048