Fermat's Little Theorem for composite numbers

1.1k Views Asked by At

In Fermat's Little Theorem we have that for a prime number $p$, $a^p \equiv a\pmod{p}$, is this ever true when $p$ is not a prime number, i.e. take some $n\in\mathbb{Z}$, would it hold true that $a^n \equiv a\pmod{n}$? Obviously here we assume $\gcd(a,n)=1$.

1

There are 1 best solutions below

0
On

There are non-Carmichael examples as well. For instance $6^{35}\equiv 6 \pmod{35}$