$n$ is prime $\iff$ $a^{n-1} \equiv 1 \mod n \hspace{10mm} \forall 1 \le a \le n-1$
What is the name of this theorem in literature?
$n$ is prime $\iff$ $a^{n-1} \equiv 1 \mod n \hspace{10mm} \forall 1 \le a \le n-1$
What is the name of this theorem in literature?
Copyright © 2021 JogjaFile Inc.
$\Longrightarrow$ is Fermat's little theorem
$\Longleftarrow$ is the definition of prime: any $a<n$ is coprime to $n$, and therefore $n$ must be prime.