Wilson factorial congruence modulo a triangular number (source code)

= Wilson factorial congruence modulo a triangular number
{c}
{title2=$(p-1)!\equiv p-1\pmod{p(p-1)/2}$}

For an odd <prime number> $p$, put $m=(p-1)/2$. Both $(p-1)!$ and $p-1$ are divisible by $m$. By <Wilson's theorem>, they are also congruent modulo $p$, because each is $-1$ modulo $p$. The <coprime integers> $m,p$ therefore both divide their difference, giving the displayed <integer congruence>. This combines the prime-modulus factorial identity with an elementary divisibility constraint.