Talk:Wilson's Theorem/Corollary 2

Generalization?
The statement of Wilson's Theorem is:
 * $\paren {p - 1}! \equiv -1 \pmod p$ for primes $p$

How does one recover Wilson's Theorem from this 'generalization'?

For reference if we plug in $n = p - 1$ we have:
 * $a_0 = p - 1, \mu = 0$

hence the theorem asserts that:
 * $\dfrac {\paren {p - 1}!} {p^0} \equiv \paren {-1}^0 \paren {p - 1}! \pmod p$

which is simply
 * $\paren {p - 1}! \equiv \paren {p - 1}! \pmod p$

It could technically be called a Corollary. --RandomUndergrad (talk) 16:31, 8 July 2020 (UTC)


 * Makes sense. Haven't a clue where I got this from now, it was from the early days when we hadn't started citing our source works. I'll rename it. --prime mover (talk) 17:45, 8 July 2020 (UTC)


 * Aha, found it now, it was in Knuth.


 * In the notation of exercise $12$, we can determine $n! \mod p$ in terms of the $p$-ary representation, for any positive integer $n$, thus generalizing Wilson's theorem. In fact, prove that $n! / p^\mu \equiv \paren {-1}^mu a_0! a_1! \dotsm a_k! \pmod p$.


 * This was : $\S 1.2.5$: Permutations and Factorials: Exercise $14$ --prime mover (talk) 18:10, 8 July 2020 (UTC)