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\)

Explanation

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.

Study Elementary number theory in ZWMath →

Review the concept: Fermat's little theorem

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.

\[a^{p-1}\equiv 1 \pmod{p}, \quad p\nmid a\]

More practice problems: fermat's little theorem

← ZW-FERMAT-S-LITTLE-THEOREM-004 ZW-FERMAT-S-LITTLE-THEOREM-006 →