2

How to (dis)prove this

$ (n-2)! \equiv 1 \mod n$

If n is said to be a prime number. I guess we'll have to use FERMAT’S LITTLE THEOREM, and I just don't know where to start from. Thanks in advance

1 Answers1

6

If $\;n=p\;$ is a prime, then by Wilson's theorem

$$\color{red}{-1}=(p-1)!=(p-2)!(p-1)=\color{red}{-(p-2)!\pmod p}\implies 1= (p-2)!\pmod p$$

DonAntonio
  • 214,715