# Wilson prime

A Wilson prime is a special kind of prime number. A prime number p is a Wilson prime if (and only if [ iff ])

${\displaystyle {\frac {\left(p-1\right)!+1}{p^{2}}}=n\,\!}$

where n is a positive integer (sometimes called natural number). Wilson primes were first described by Emma Lehmer.[1]

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

${\displaystyle {\frac {\log \left(\log y\right)}{\log x}}}$.

Compare this with Wilson's theorem, which states that every prime p divides (p − 1)! + 1.

## Notes

1. On congruences involving Bernoulli numbers and the quotients of Fermat and Wilson, Ann. of. Math. 39(1938), 350-360.
2. Status of the search for Wilson primes, also see Crandall et al. 1997
3. The Prime Glossary: Wilson prime

## References

• N. G. W. H. Beeger (1913–1914). "Quelques remarques sur les congruences rp-1 ≡ 1 (mod p2) et (p-1!) ≡ -1 (mod p2)". The Messenger of Mathematics. 43: 72–84.CS1 maint: date format (link)
• Karl Goldberg (1953). "A table of Wilson quotients and the third Wilson prime". J. Lond. Math. Soc. 28: 252–256. doi:10.1112/jlms/s1-28.2.252.
• Ribenboim, Paulo (1996). The new book of prime number records. Springer-Verlag. p. 346. ISBN 978-0-387-94457-9.
• Richard E. Crandall (1997). "A search for Wieferich and Wilson primes". Math. Comput. 66 (217): 433–449. doi:10.1090/S0025-5718-97-00791-6. Unknown parameter |coauthors= ignored (|author= suggested) (help)
• Crandall, Richard E.; Pomerance, Carl (2001). Prime Numbers: A Computational Perspective. Springer-Verlag. p. 29. ISBN 978-0-387-94777-8.
• Takashi Agoh (1998). "Wilson quotients for composite moduli". Math. Comput. 67 (222): 843–861. Unknown parameter |coauthors= ignored (|author= suggested) (help)
• Erna H. Pearson (1963). "On the Congruences (p-1)! ≡ -1 and 2p-1 ≡ 1 (mod p2)" (PDF). Math. Comput. 17: 194–195.