Wilson Theorem to find least nonnegative residue modulo m

2k Views Asked by At

I want to know how can we use Wilson's theorem to find least nonnegative residue modulo $m$. For example:

$$n = 64! \quad m = 67$$

Can you please explain the process step by step? Thank you

1

There are 1 best solutions below

5
On

Since $m = 67$ is prime, it is clear from Wilson's Theorem that: $66! \equiv 66 \pmod {67}$. Further observe that since $\gcd(66,67) = 1$, by the Cancellation Law for modular arithmetic, we have:

\begin{align}\tag1 65! \equiv 65 \cdot (64!) \equiv 1 \pmod{67}\end{align}

Knowing that $65 \equiv -2 \pmod{67}$ and $\gcd(65,67) = 1$, we can see that the linear congruence $65x \equiv -2x \equiv 1 \pmod{67}$ has a solution, namely $x = 33$. Multiplying both sides of congruence $(1)$ by $33$, we get:

\begin{align}(65 \cdot 33) \cdot 64! &\equiv 64! \pmod{67}\\ &\equiv 33 \pmod{67}\end{align}