Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2017/ia/paper-4/5d/c/solution

Split the factorial at , using :
By Wilson theorem, this is . Therefore . If the prime number is odd, then is even, so and
For , the signs and are identical modulo , and the two possibilities also give the same result. The empty product convention includes the endpoint cases. This is the complementary factorial congruence.

New to topics? Read the docs here!