Which of these is the correct statement of Wilson's theorem?

1.4k Views Asked by At

My textbook states: If $p$ is a prime, then $(p-1) \equiv -1\pmod p$.

But the online version is $(p-1)! \equiv -1\pmod p$.

Which one is correct?

1

There are 1 best solutions below

3
On BEST ANSWER

The second one is Wilson's theorem.

Though the first one is not absurd, since

$$p\equiv 0\pmod p$$

you always have

$$p-1\equiv -1\pmod p$$

whether $p$ is prime or not.