Wilson’s theorem for prime powers

For every natural numberMathworldPlanetmath n, let (n!¯)p denote the productPlanetmathPlanetmath of numbers 1mn with gcd(m,p)=1.

For prime p and s

(ps!¯)p(1for p=2,s3-1otherwise(modps).

Proof: We pair up all factors of the product (ps!¯)p into those numbers m where mm-1(modps) and those where this is not the case. So (ps!¯)p is congruentMathworldPlanetmath (modulo ps) to the product of those numbers m where mm-1(modps)m21(modps).

Let p be an odd prime and s. Since 2ps, ps|(m2-1) implies ps|(m+1) either or ps|(m-1). This leads to


for odd prime p and any s.

Now let p=2 and s2. Then




we have


For p=2,s3, but -1 for s=1,2.

Title Wilson’s theorem for prime powers
Canonical name WilsonsTheoremForPrimePowers
Date of creation 2013-03-22 13:22:14
Last modified on 2013-03-22 13:22:14
Owner Thomas Heye (1234)
Last modified by Thomas Heye (1234)
Numerical id 8
Author Thomas Heye (1234)
Entry type Theorem
Classification msc 11A07
Classification msc 11A41