Exercise · ZW-FERMAT-S-LITTLE-THEOREM-005 · ★★☆ Intermediate
If \(p=7\) and \(a=2\), what value does \(a^{p-1}\bmod p\) take?
Choose one option.
Show answer
- B. \(1\)
Exercise · ZW-FERMAT-S-LITTLE-THEOREM-005 · ★★☆ Intermediate
Choose one option.
Since \(7\) is prime and \(7\nmid 2\), the theorem gives \(2^{6}\equiv 1\pmod 7\). The option \(6\) is the value of \(p-1\), not of the power.
Fermat's little theorem states that if \(p\) is a prime number and \(a\) is an integer not divisible by \(p\), then \(a^{p-1}\equiv 1 \pmod{p}\). It is a basic tool for simplifying modular powers.
← ZW-FERMAT-S-LITTLE-THEOREM-004 ZW-FERMAT-S-LITTLE-THEOREM-006 →