Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2002/ia/paper-4/7b/b/solution

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 .

New to topics? Read the docs here!