1

Prove that $n$ is a prime number if and only if $(n−2)! \equiv 1 \pmod n$.

I proved the part where we suppose that the latter is true and prove that n is prime. However, I'm stuck on how to prove the latter is true assuming n is prime. I tried following the proof for Wilson's Theorem, but I'm not sure how to translate it into a proof for $(n-2)!$. Can anyone show me where to start?

Ismael
  • 179
  • 3
    Just use Wilson's theorem, and forget about its proof.... – Angina Seng Nov 09 '17 at 20:46
  • I haven't tried the proof yet but the way the problem is constructed seems to scream for induction, so I'd try induction. – Daniel Gendin Nov 09 '17 at 20:53
  • DON"T DO INDUCTION!!!!!!! There I screamed so hopefully the screams cancel out. Not that if $p$ is prime then for any $k$ there is a unique $m\mod p$ so that $km \equiv 1 \mod p$. And that will be it! $(n-2)!$ is the product of all $k\mod p$ except $-1$ so for every $k$ the $k^{-1}$ will also be a term of the product. Except $-1$ (All that is left is showing $-1$ and $1$ are the only $x^2 \equiv 1 \mod n$ solutions.) – fleablood Nov 09 '17 at 21:02

0 Answers0