# Wilson prime

Named after John Wilson 1938[1] Emma Lehmer 3 5, 13, 563 563 A007540

A Wilson prime, named after English mathematician John Wilson, is a prime number p such that p2 divides (p − 1)! + 1, where "!" denotes the factorial function; compare this with Wilson's theorem, which states that every prime p divides (p − 1)! + 1.

The only known Wilson primes are 5, 13, and 563 (sequence A007540 in OEIS); if any others exist, they must be greater than 2×1013.[2] It has been conjectured that infinitely many Wilson primes exist, and that the number of Wilson primes in an interval [xy] is about log(log(y)/log(x)).[3]

Several computer searches have been done in the hope of finding new Wilson primes.[4][5][6] The Ibercivis distributed computing project includes a search for Wilson primes.[7] Another search is coordinated at the mersenneforum.[8]

## Generalizations

### Near-Wilson primes

A prime p satisfying the congruence (p − 1)! ≡ − 1 + Bp (mod p2) with small |B| can be called a near-Wilson prime. Near-Wilson primes with B = 0 represent Wilson primes. The following table lists all such primes with |B| ≤ 100 from 106 up to 4×1011:[2]

### Wilson numbers

A Wilson number is an integer m such that W(m) ≡ 0 (mod m), where W(m) denotes the Wilson quotient (i.e. $\tfrac{(m-1)!+1}{m}$) (sequence A157250 in OEIS). If m is prime, then m is a Wilson prime. There are 12 Wilson numbers up to 5×108.[9]

## Notes

1. ^ Lehmer, Emma (April 1938). "On congruences involving Bernoulli numbers and the quotients of Fermat and Wilson". Annals of Mathematics 39 (2): 350–360. doi:10.2307/1968791. Retrieved 8 March 2011.
2. ^ a b A Search for Wilson primes Retrieved on November 2, 2012.
3. ^ The Prime Glossary: Wilson prime
4. ^ McIntosh, R. (9 March 2004). "WILSON STATUS (Feb. 1999)". E-Mail to Paul Zimmermann. Retrieved 6 June 2011.
5. ^ A search for Wieferich and Wilson primes, p 443
6. ^ Ribenboim, P.; Keller, W. (2006). Die Welt der Primzahlen: Geheimnisse und Rekorde (in German). Berlin Heidelberg New York: Springer. p. 241. ISBN 3-540-34283-4.
7. ^ Ibercivis site
8. ^ Distributed search for Wilson primes (at mersenneforum.org)
9. ^ Agoh, Takashi; Dilcher, Karl; Skula, Ladislav (1998). "Wilson quotients for composite moduli". Math. Comput. 67 (222): 843–861. doi:10.1090/S0025-5718-98-00951-X.