How is it that (p-1)! is not congruent with 0 mod p if p is prime?

91 Views Asked by At

Why is this statement true?

If $p$ is prime then $(p-1)! \not\equiv 0\space mod\space p$.

I would like to know why this is true.

1

There are 1 best solutions below

0
On BEST ANSWER

The prime factorization of $\ (p-1)!\ $ can only contain primes smaller than $p$ because we multiply numbers smaller than $\ p\ $. Hence, if $\ p\ $ is prime, $\ (p-1)!\ $ cannot be divisible by $\ p\ $. In fact, by Wilson's theorem, we have $$p\mid (p-1)!+1$$ for every prime $\ p\ $.