cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A007540 Wilson primes: primes p such that (p-1)! == -1 (mod p^2).

Original entry on oeis.org

5, 13, 563
Offset: 1

Views

Author

Keywords

Comments

Suggested by the Wilson-Lagrange Theorem: An integer p > 1 is a prime if and only if (p-1)! == -1 (mod p). Cf. Wilson quotients, A007619.
Sequence is believed to be infinite. Next term is known to be > 2*10^13 (cf. Costa et al., 2013).
Intersection of the Wilson numbers A157250 and the primes A000040. - Jonathan Sondow, Mar 04 2016
Conjecture: Odd primes p such that 1^(p-1) + 2^(p-1) + ... + (p-1)^(p-1) == p-1 (mod p^2). - Thomas Ordowski and Giovanni Resta, Jul 25 2018
From Felix Fröhlich, Nov 16 2018: (Start)
Harry S. Vandiver apparently said about the Wilson primes "It is not known if there are infinitely many Wilson primes. This question seems to be of such a character that if I should come to life any time after my death and some mathematician were to tell me that it had definitely been settled, I think I would immediately drop dead again." (cf. Ribenboim, 2000, p. 217).
Let p be a Wilson prime and let i be the index of p in A000040. For n = 1, 2, 3, the values of i are 3, 6, 103. The primes among those values are Lerch primes, i.e., terms of A197632. Is this a property that necessarily follows if i is prime (cf. Sondow, 2011/2012, 2.5 Open Problems 5)? (End)
From Amiram Eldar, Jun 16 2021: (Start)
Named after the English mathematician John Wilson (1741-1793) after whom "Wilson's theorem" was also named.
The primes 5 and 13 appear in an exercise involving the Wilson congruence in Mathews (1892). [Edited by Felix Fröhlich, Jul 23 2021]
Beeger found that there are no other smaller terms up to 114 (1913) and up to 200 (1930).
a(3) = 563 was found by Goldberg (1953), who used the Bureau of Standards Eastern Automatic Computer (SEAC) to search all primes less than 10000. According to Goldberg, the third prime was discovered independently by Donald Wall six month later. (End)

References

  • N. G. W. H. Beeger, On the Congruence (p-1)! == -1 (mod p^2), Messenger of Mathematics, Vol. 49 (1920), pp. 177-178.
  • Albert H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964, p. 52.
  • Calvin C. Clawson, Mathematical Mysteries, Plenum Press, 1996, p. 180.
  • Richard Crandall and Carl Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; see p. 29.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, th. 80.
  • G. B. Mathews, Theory of Numbers Part I., Cambridge: Deighton, Bell and Co., London: George Bell and Sons, 1892, page 318.
  • Paulo Ribenboim, My Numbers, My Friends: Popular Lectures on Number Theory, Springer Science & Business Media, 2000, ISBN 0-387-98911-0.
  • Paulo Ribenboim, The Book of Prime Number Records. Springer-Verlag, NY, 2nd ed., 1989, p. 277.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 234-235.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Ilan Vardi, Computational Recreations in Mathematica. Addison-Wesley, Redwood City, CA, 1991, p. 73.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers, Penguin Books, NY, 1986, p. 163.

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[500]], Mod[(# - 1)!, #^2] == #^2 - 1 &] (* Harvey P. Dale, Mar 30 2012 *)
  • PARI
    forprime(n=2, 10^9, if(Mod((n-1)!, n^2)==-1, print1(n, ", "))) \\ Felix Fröhlich, Apr 28 2014
    
  • PARI
    is(n)=prod(k=2,n-1,k,Mod(1,n^2))==-1 \\ Charles R Greathouse IV, Aug 03 2014
    
  • Python
    from sympy import prime
    A007540_list = []
    for n in range(1,10**4):
        p, m = prime(n), 1
        p2 = p*p
        for i in range(2,p):
            m = (m*i) % p2
        if m == p2-1:
            A007540_list.append(p) # Chai Wah Wu, Dec 04 2014