In number theory, a Wilson prime is a prime number
" denotes the factorial function; compare this with Wilson's theorem, which states that every prime
Both are named for 18th-century English mathematician John Wilson; in 1770, Edward Waring credited the theorem to Wilson,[1] although it had been stated centuries earlier by Ibn al-Haytham.
[2] The only known Wilson primes are 5, 13, and 563 (sequence A007540 in the OEIS).
Costa et al. write that "the case
is trivial", and credit the observation that 13 is a Wilson prime to Mathews (1892).
[3][4] Early work on these numbers included searches by N. G. W. H. Beeger and Emma Lehmer,[5][3][6] but 563 was not discovered until the early 1950s, when computer searches could be applied to the problem.
[3][7][8] If any others exist, they must be greater than 2 × 1013.
[3] It has been conjectured that infinitely many Wilson primes exist, and that the number of Wilson primes in an interval
[9] Several computer searches have been done in the hope of finding new Wilson primes.
[10][11][12] The Ibercivis distributed computing project includes a search for Wilson primes.
[13] Another search was coordinated at the Great Internet Mersenne Prime Search forum.
[14] Wilson's theorem can be expressed in general as
and prime
Generalized Wilson primes of order n are the primes p such that
It was conjectured that for every natural number n, there are infinitely many Wilson primes of order n. The smallest generalized Wilson primes of order
satisfying the congruence
can be called a near-Wilson prime.
Near-Wilson primes with
are bona fide Wilson primes.
The table on the right lists all such primes with
[3] A Wilson number is a natural number
term is positive if and only if
has a primitive root and negative otherwise.
[15] For every natural number
, and the quotients (called generalized Wilson quotients) are listed in OEIS: A157249.
The Wilson numbers are If a Wilson number
is a Wilson prime.
There are 13 Wilson numbers up to 5×108.