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.