Exercise · ZW-FERMAT-PRIMALITY-TEST-001 · ★☆☆ Basic
What does \( a^{n-1} \not\equiv 1 \pmod{n} \) with gcd(a, n) = 1 tell you?
Choose one option.
Show answer
- A. That n is composite
Exercise · ZW-FERMAT-PRIMALITY-TEST-001 · ★☆☆ Basic
Choose one option.
If n were prime, Fermat's little theorem would guarantee the congruence, so its failure proves that n is composite.
The Fermat primality test is a probabilistic criterion for an integer \(n>1\): it declares \(n\) composite if, for some base \(a\) coprime to \(n\), the power \(a^{n-1}\) is not congruent to 1 modulo \(n\).