Wilson’sTheoremandFermat’sTheorem
sites.millersville.edu › bikenaga › number-theoryExample. Find the least nonnegative residue of 70! (mod 5183). Note: 5183 = 71·73. I’ll start by finding the residues of x= 70! mod 71 and 73. By Wilson’s theorem, x= 70! = −1 (mod 71). Next, let x= 70! (mod 73). Then x= 70! (mod 73) 71·72·x= 70!·71·72 (mod 73) (−2)(−1)x= 72! (mod 73) 2x= −1 (mod 73) Note that 2·37 = 74 = 1 (mod 73). So