Wilson prime

Wilson prime
Named afterJohn Wilson
No. of known terms3
First terms5, 13, 563
OEIS index
  • A007540
  • Wilson primes: primes p such that (p−1)!≡−1 (mod⁡p2)

In number theory, a Wilson prime 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. Both are named for 18th-century English mathematician John Wilson; in 1770, Edward Waring credited the theorem to Wilson, although it had been stated centuries earlier by Ibn al-Haytham.

The only known Wilson primes are 5, 13, and 563 (sequence A007540 in the OEIS). Costa et al. write that "the case p=5 is trivial", and credit the observation that 13 is a Wilson prime to Mathews (1892). Early work on these numbers included searches by N. G. W. H. Beeger and Emma Lehmer, but 563 was not discovered until the early 1950s, when computer searches could be applied to the problem. If any others exist, they must be greater than 2 × 1013. It has been conjectured that infinitely many Wilson primes exist, and that the number of Wilson primes in an interval [x,y] is about log⁡logxy.

Several computer searches have been done in the hope of finding new Wilson primes. The Ibercivis distributed computing project includes a search for Wilson primes. Another search was coordinated at the Great Internet Mersenne Prime Search forum.

Generalizations

Wilson primes of order n

Wilson's theorem can be expressed in general as (n−1)!(p−n)!≡(−1)n modp for every integer n≥1 and prime p≥n. Generalized Wilson primes of order n are the primes p such that p2 divides (n−1)!(p−n)!−(−1)n.

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 n are:

5, 2, 7, 10429, 5, 11, 17, ... (The next term > 1.4 × 107) (sequence A128666 in the OEIS)

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 are bona fide Wilson primes. The table on the right lists all such primes with |B|≤100 from 106 up to 4×1011.

Wilson numbers

A Wilson number is a natural number n such that W(n)≡0 (mod⁡n2), where W(n)=±1+∏gcd⁡(k,n)=11≤k≤nk,and where the ±1 term is positive if and only if n has a primitive root and negative otherwise. For every natural number n, W(n) is divisible by n, and the quotients (called generalized Wilson quotients) are listed in (sequence A157249 in the OEIS). The Wilson numbers are

1, 5, 13, 563, 5971, 558771, 1964215, 8121909, 12326713, 23025711, 26921605, 341569806, 399292158, ... (sequence A157250 in the OEIS)

If a Wilson number n is prime, then n is a Wilson prime. There are 13 Wilson numbers up to 5×108.

See also