1

How might one show that $p$ divides $(p-2)!-1$ where $p$ is a prime number? I am not even sure if it is true but I have been randomly trying it on some primes and it seems to be true.

Arturo Magidin
  • 398,050
Yves
  • 11

1 Answers1

4

Indeed it is, this is a simple corollary of Wilson's theorem: If $p$ is prime, then $(p-1)! \equiv -1$ mod p (the converse is also true, but we don't need that).

So, assuming Wilson's theorem, $-1 \equiv (p-1)! \equiv (p-1)(p-2)!\equiv -(p-2)!$ from which we immediately get $(p-2)! \equiv 1$ mod p.

To prove Wilson's theorem, see here: http://en.wikipedia.org/wiki/Wilson%27s_theorem

Edit: Whoops, I see I was beaten to this answer in the comment thread, sorry.

Hunter Spink
  • 1,699