Wilson's Theorem/Corollary 2/Proof 2

Proof
Consider the numbers of $\set {1, 2, \ldots, n}$ which are not multiples of $p$.

There are $\floor {\dfrac n p}$ complete sets of $p - 1$ such consecutive elements of $\set {1, 2, \ldots, n}$.

Each one of these has a product which is congruent to $-1 \pmod p$ by Wilson's Theorem.

There are also $a_0$ left over which are congruent to $a_0! \pmod p$.

Thus:
 * the contributions of the divisors which are not multiples of $p$ is $\paren {-1}^{\floor {n / p} } a_0!$


 * the contributions of the divisors which are multiples of $p$ is the same as the contribution in $\floor {\dfrac n p}!$

Thus the argument can be repeated on $\floor {\dfrac n p}!$ until the formula is complete.