Use Wilson;s Theorem to find the least nonnegative residue modulo m of integer n

n=30! m=31

Printable View

- Oct 7th 2008, 11:32 AMbigbWilson's Theorem
Use Wilson;s Theorem to find the least nonnegative residue modulo m of integer n

n=30! m=31 - Oct 7th 2008, 11:41 AMMoo
Hello,

Wilson's theorem : $\displaystyle (p-1)! \equiv -1 (\bmod p)$ (where p is a prime integer)

Here, p=31 and is prime.

So $\displaystyle 30! \equiv -1 (\bmod 31)$

But $\displaystyle -1 \equiv 30 (\bmod 31)$

So answer is 30, since you want the least nonnegative residue.