Wilson's theorem intuition

994 Views Asked by At

Wilson's Theorem: $p$ is prime $\iff$ $(p-1)!\equiv -1\mod p$

I can use Wilson's theorem in questions, and I can follow the proof whereby factors of $(p-1)!$ are paired up with their (mod $p$) inverses, but I am struggling to gain further insight into the meaning of the theorem.

To try and find a more tangible expression, I tried rewriting the theorem as:

  • $p$ prime $\iff (p-1)!+1\equiv 0\mod p$
  • $p$ prime $\iff (p-1)!\equiv p-1\mod p$
  • $p$ prime $\iff p|(p-1)!+1 \implies (p-1)!+1=kp,k\in\mathbb{Z}$
  • $p$ prime $\iff (p-1)!=kp-1$

But I found none of these particularly instructive.

We have $(p-1)!$, containing no factors of $p$, which somehow evaluates to one less than a multiple of $p$ if and only if $p$ is prime. What can we say about $(m-1)!$ if $m$ is composite?

I guess what I'm asking for is some 'informal' or more conceptually based justification of this theorem.