By brute force I'm noticing that for all $a ∈ _7$, we have $a^{19}\bmod 7 \equiv a $. Now this looks very much like Fermat's Little Theorem, but this theorem should hold if the primes are the same, whereas 19 and 7 are clearly not. Is this just a coincidence?
Asked
Active
Viewed 43 times
-1
-
It is FLT. If $7|a$ then $a^{19}\equiv 0\equiv a \pmod 7$ and if $7\not \mid a$ the $a^{6} \equiv 1\pmod 7$ so $a^{18}\equiv 1\pmod 7$ and $a^{19}\equiv a \pmod 7$. – fleablood Apr 18 '20 at 20:36
2 Answers
2
Since $7$ is prime, $\varphi(7)=6$, so $$a^6=1\pmod{7}$$ by Euler's Theorem, where $\varphi $ is Euler's totient function.

Shaun
- 44,997
-
1This doesn't cover the case $a=0$, although that's almost trivial to remedy. Also, note that Fermat's little theorem is enough (not that I'm against Euler's theorem, it's just that FLT was mentioned in the OP, so it could be nice to keep using that). – Arthur Apr 18 '20 at 19:49
-
1
By Fermat's Little Theorem:
$a^{6}\equiv 1\pmod{7}$
Thus:
$(a^{6})^{3}\equiv 1^{3}\pmod{7}$
$a^{18}\equiv 1\pmod{7}$
Multiplying by $a$ on both dies, we have:
$\boxed{a^{19}\equiv a\pmod{7}}$
The above argument works only for $a$ relatively prime to $7$. For $a$ not relatively prime to $7$, this means $a\equiv 0\pmod{7}$ because $7$ is prime. Then, it can be demonstrated that
$0^{19}\equiv 0\pmod{7}$

Joshua Wang
- 6,103
-
$42^6\not \equiv 1 \pmod 7$. Nowhere in the OP was it is stated that $\gcd(a,7) = 1$. – fleablood Apr 18 '20 at 20:41