Exercise · ZW-FERMAT-PRIMALITY-TEST-008 · ★★☆ Intermediate
For n = 13 and a = 5, what is the remainder of \( 5^{12} \bmod 13 \)?
Choose one option.
Show answer
- B. 1
Exercise · ZW-FERMAT-PRIMALITY-TEST-008 · ★★☆ Intermediate
Choose one option.
By Fermat's little theorem, \( 5^{12} \equiv 1 \pmod{13} \), since 13 is prime and gcd(5, 13) = 1.
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\).
← ZW-FERMAT-PRIMALITY-TEST-007 ZW-FERMAT-PRIMALITY-TEST-009 →