# Wilson prime

By Wilson’s theorem we know that every prime*p*divides (

*p*-1)!+1.

*p*is a

**Wilson prime**if

*p*

^{2}divides (

*p*-1)!+1. For example 5 is a Wilson prime because 25 divides 4!+1=25. The only known Wilson primes are 5, 13, and 563; there are no others less than 500,000,000.

It is conjectured that the number of Wilson
primes is infinite and that the
number of such primes between *x* and *y*
should be about log(log *y*/log *x*). So
it may be awhile before we find the fourth such prime!
So what about composite numbers? To define a
Wilson composite we first need an analog of
Wilson's theorem that applies to composites:

We say a composite number

- Theorem
- Let
nbe an integer greater than one. Letmbe the product of all of the positive integers less thann, but relatively prime ton(som=(n-1)! ifnis prime).ndivides eitherm+1 orm-1.

*n*is a

**Wilson Composite**if

*n*

^{2}divides either

*m*+1 or

*m*-1. The only such number below 50000 is 5971. Others include 558771, 1964215, 8121909 and 12326713; there are no others less than 10,000,000.

**See Also:** WilsonsTheorem, WieferichPrime, WallSunSunPrime

**Related pages** (outside of this work)

**References:**

- ADS98
T. Agoh,K. DilcherandL. Skula, "Wilson quotients for composite moduli,"Math. Comp.,67(1998) 843--861.MR 98h:11003(Abstract available)- CDP97
R. Crandall,K. DilcherandC. Pomerance, "A search for Wieferich and Wilson primes,"Math. Comp.,66:217 (1997) 433--449.MR 97c:11004(Abstract available)

Printed from the PrimePages <primes.utm.edu> © Chris Caldwell.