Wilsons Theorem
Wilsons Theorem
Wilsons Theorem
For example,
For example,
2 divides 1! + 1 = 2
3 divides 2! + 1 = 3
Wilson’s Theorem
If p is prime,
then (p – 1)! ≡ – 1 ( mod p).
Wilson’s Theorem
Example,
Let p = 7.
We have,
(7 – 1)! = 6! = 1 x 2 x 3 x 4 x 5 x 6
Arrange the factors,
2 x 4 ≡ 1 (mod 7) and 3 x 5 ≡ 1 (mod 7)
Hence,
6! ≡ 1 x (2 x 4) x (3 x 5) x 6 ≡ 1 x 6 ≡ -1 (mod 7).
Wilson’s Theorem
Example 2,
Let p = 3
Let p = 5
Example,
Let p = 6
(p – 1)! ≡ 0 (mod p)
(6 – 1)! ≡ 5!
≡ 120 ≡ 0 (mod 6)
Wilson’s Theorem
Let p = 7
(p – 1)! ≡ 0 (mod p)
(7 – 1)! ≡ 6!
≡ 720 is not a prime since 7 ł 720