Fermat's Little Theorem
Fermat's little theorem, a famous theorem from elementary number theory,
will be explored in this lab. Let p be a prime and a any positive integer
that is not divisible by p. Then Fermat’s little theorem states that
ap-1 ≡ 1 mod p.
Fermat's little theorem is the foundation for many results in number theory
and is the basis for several factorization methods in use today.
Exercises
Un Applet (Zn under multiplication) |
|
|
|
- Use the ring structure of Zp and the
Un applet to the right
to verify Fermat's little theorem for
several different primes p and positive integers a which are relatively
prime to p.
- Why does a have to be relatively prime to p? What happens if
gcd(a, p) = p? Give some examples.
- Is p - 1 necessarily the smallest positive integer r such that
ar ≡ 1 mod p? Why or why not?
- Use Fermat's little theorem to solve the following linear congruences.
- 5x ≡ 14 mod 11
- 6x ≡ 10 mod 23
- Use Fermat's little theorem to evaluate 2235 mod 19.
- Use Lagrange's theorem from group theory to prove Fermat's little
theorem.
- In some texts, Fermat's little theorem is stated as ap ≡ a mod p
for any integer a. Use the binomial theorem and induction on a
to prove this version of Fermat's little theorem for a >= 0.
(Hint: (x + y)p = xp + yp mod p.)
Use this result to prove Fermat's little theorem for a < 0.
- Is the statement an ≡ a mod n true if n
is a composite number? Use
the applet to explore this question. (If you get stuck, try n = 341 and a = 2.)