Solution (source code)

= Solution

Put $m=(p-1)/2$, so the requested modulus is $pm$. The <factorial> $(p-1)!$ is divisible by $m$, and so is $p-1=2m$. Also, <Wilson's theorem> gives $(p-1)!\equiv-1\equiv p-1\pmod p$. Because $m$ and $p$ are <coprime integers>, their product divides the difference. Thus the <Wilson factorial congruence modulo a triangular number> is
$$
\boxed{(p-1)!\equiv p-1\pmod{p(p-1)/2}}.
$$
The displayed residue lies in the standard range even at $p=3$.