Wilson’s theorem for prime powers


For every natural numberMathworldPlanetmath n, let (n⁢!¯)p denote the productPlanetmathPlanetmath of numbers 1≤m≤n with g⁢c⁢d⁢(m,p)=1.

For prime p and s∈ℕ

(ps!¯)p≡(1for ⁢p=2,s≥3-1otherwise(modps).

Proof: We pair up all factors of the product (ps⁢!¯)p into those numbers m where m≢m-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 m≡m-1(modps)↔m2≡1(modps).

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

(ps⁢!¯)p≡-1(modps)

for odd prime p and any s∈ℕ.

Now let p=2 and s≥2. Then

(1+t.2s-1)2≡1(mod2s),t=+-1.

Since

(2s-1+1)⁢(2s-1-1)≡-1(mod2s),

we have

(ps⁢!¯)p≡(-1).(-1)=1(modps)

For p=2,s≥3, 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