Professional Documents
Culture Documents
1 Introduction
We will study the proofs and some applications of the following congruences.
2 Wilson’s Theorem
Exercise 1. Prove: an integer a is its own inverse modulo a prime p if and only if
a ≡ ±1 (mod p) if and only if a ≡ 1 or p − 1 (mod p).
1
Prof A. Munagi Lec12: Three Special Congruences MATH4024-Number Theory
Remark. Theorem 2.1 also follows from the fact that Zp = {1, 2, . . . , p − 1} is a
multiplicative (cyclic) group in which every element has an inverse. Since only 1 and
p − 1 are their own inverses in Zp , it follows that
Interestingly the converse of Wilson’s Theorem is also true. We are rewarded with
a primality test.
Since n is composite ∃ integers a, b with n = ab, where 1 < a < n, 1 < b < n.
Since a < n we have that a|(n − 1)!;
Equation (1) implies that n|((n − 1)! + 1).
But a|n =⇒ a|((n − 1)! + 1).
Now a|(n − 1)! and a|((n − 1)! + 1) implies that a|((n − 1)! + 1 − (n − 1)!) ⇐⇒ a|1.
This is a contradiction because a > 1.
Example. Is the number 6 prime? Using the converse of Wilson’s Theorem we compute
2
Prof A. Munagi Lec12: Three Special Congruences MATH4024-Number Theory
Exercise 2. Use the Converse of Wilson’s Theorem to determine the primality of 13.
a, 2a . . . , (p − 1)a. (2)
None of these integers is divisible by p, for if p|ja, then p|j since p - a. But this is
impossible because 1 ≤ j ≤ p − 1.
Furthermore, no two of the integers are congruent modulo p. To see this, assume that
ja ≡ ka (mod p), where 1 ≤ j < k ≤ p − 1. Then since (a, p) = 1, we obtain j ≡ k
(mod p). But this congruence is impossible because j and k are positive integers < p.
Because the integers in (2) form a set of p − 1 integers all incongruent to 0 modulo
p, and we know that the least positive residue of the seq (2), taken in some order, must
be the integers
1, 2 . . . , (p − 1). (3)
Therefore the product of the integers in (2) is congruent modulo p to the product of
the integers in (3). Hence
a · 2a · · · (p − 1)a ≡ 1 · 2 · · · (p − 1) (mod p)
.
=⇒ ap−1 (p − 1)! ≡ (p − 1)! (mod p).
Since ((p − 1)!, p) = 1, we may cancel (p − 1)! to obtain ap−1 ≡ 1 (mod p).
Exercise 3. Use Theorem 3.1 or otherwise to derive the following more complete
Fermat’s Little Theorem:
3
Prof A. Munagi Lec12: Three Special Congruences MATH4024-Number Theory