Put , so the requested modulus is . The factorial is divisible by , and so is . Also, Wilson's theorem gives . Because and are coprime integers, their product divides the difference. Thus the Wilson factorial congruence modulo a triangular number is
The displayed residue lies in the standard range even at .