If
\[p\]
is a prime number then \[(p-1)! \equiv p-1 \; (mod \; 1+2+...+p-1)\]
.Proof
We can write the theorem as
\[(p-1)! \equiv p-1 \; (mod \; \frac{p(p-1)}{2})\]
.Wilson's Theorem states
\[(p-1)! \equiv -1 \equiv -1 \; (mod \; p) \rightarrow (p-1)! \equiv -1 \equiv p-1 \; (mod \; p)\]
.\[(p-1)! \equiv p-1 \; (mod \; \frac{p-1}{2})\]
is true since \[\frac{p-1}{2}\]
divides both sides. \[gcd(p, \frac{p-1}{2})\]
so \[(p-1)! \equiv p-1 \; (mod \; \frac{p(p-1)}{2})\]
.