Exercise · ZW-FERMAT-PRIMALITY-TEST-007 · ★★☆ Intermediate
Use the test with base 2 for n = 9. What do you conclude?
Choose one option.
Show answer
- C. 9 is composite, because \( 2^8 \equiv 4 \pmod{9} \)
Exercise · ZW-FERMAT-PRIMALITY-TEST-007 · ★★☆ Intermediate
Choose one option.
We have \( 2^8 = 256 = 28\cdot 9 + 4 \), so the remainder is 4 rather than 1; the congruence fails and 9 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\).
← ZW-FERMAT-PRIMALITY-TEST-006 ZW-FERMAT-PRIMALITY-TEST-008 →