3.5.3 Wilson’s Theorem
I’ve seen a couple of questions in the latter stages of the number sense question which asks something along the lines of:
6!≅x(mod 7),0≤x≤6,x=?
Questions like this use the result from Wilson’ Theorem which states:
For prime p, (p−1)!≅(p−1)(mod p)
So using the above Theorem, we know that 6!≅x(mod 7),0≤x≤6,x=6.
It is essentially for p to be prime Wilson’s Theorem to be applicable. Usually, with factorial problems, you can lump common factors and then can check divisibility. For example:
4!≅x(mod 6),0≤x≤5,x=?
Well we know that 4!=4⋅3⋅2⋅1=4⋅6≅0(mod 6)⇒x=0.
The following are some more problems to give you some practice:
Problem Set 3.5.3
(4!)(3!)(2!)congx(textmod8), 0lexle7, then x=
(4+2)!congx(textmod7), 0lexle6, then x=
(5−2)!congx(textmod5), 0lexle5, then x=
frac5!cdot3!4!congk(textmod8), 0lekle7, then k=
frac5!cdot4!3!congk(textmod9), 0lekle8, then k=
5!cdot3!congk(textmod8), 0lekle7, then k=