2

I thought of using Wilson's theorem for the proof.

First we have by Wilson's theorem $$(p - 1)!+1 \equiv 0 \pmod p$$ We can write this as $$(p - 2)!(p-1)+1 \equiv 0 \pmod p$$ $$(p - 2)!(p-1)+1=p(p-2)!-[(p-2)!-1]$$ Hence the right side p(p-2)! is divisible by p also the other term is divisible by p. So we have $$(p - 2)!-1 \equiv 0 \pmod p$$.

Is this correct?

mod
  • 559

1 Answers1

2

The proof is very simple: first by Wilson theorem: $$(p-1)! \equiv -1 \pmod p$$ with $p$ prime, now we add $p$ to the right side: $$(p-1)(p-2)! \equiv (p-1) \pmod p$$ since $gcd(p-1,p)=1$ by cancellation law we can cancel $(p-1)$ on both sides $$(p-2)! \equiv 1 \pmod p$$ $$(p-2)!-1 \equiv 0 \pmod p$$