Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Search: a197632 -id:a197632
     Sort: relevance | references | number | modified | created      Format: long | short | data
Wilson primes: primes p such that (p-1)! == -1 (mod p^2).
(Formerly M3838)
+10
32
OFFSET
1,1
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.
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.
LINKS
N. G. W. H. Beeger, Quelques remarques sur les congruences r^(p-1) == 1 (mod p^2) et (p- 1)! == -1 (mod p^2), The Messenger of Mathematics, Vol. 43 (1913), pp. 72-84.
Edgar Costa, Robert Gerbicz and David Harvey, A search for Wilson primes, Mathematics of Computation, Vol. 83, No. 290 (2014), pp. 3071-3091; arXiv preprint, arXiv:1209.3436 [math.NT], 2012.
R. Crandall, K. Dilcher and C. Pomerance, A search for Wieferich and Wilson primes, Mathematics of Computation, 66 (1997), 433-449.
Karl Goldberg, A Table of Wilson Quotients and the Third Wilson Prime, Journal of the London Mathematical Society, Vol. 28 (1953), pp. 252-256.
James Grime and Brady Haran, What do 5, 13 and 563 have in common?, YouTube video (2014).
Emma Lehmer, A Note on Wilson's Quotient, The American Mathematical Monthly, Vol. 44, No. 4 (1937), pp. 237-238.
Emma Lehmer, On the Congruence (p-1)! == -1 (mod p^2), The American Mathematical Monthly, Vol. 44, No. 7 (1937), p. 462.
Emma Lehmer, On congruences involving Bernoulli numbers and the quotients of Fermat and Wilson", Annals of Mathematics, Vol. 39, No. 2 (1938), pp. 350-360.
George Ballard Mathews, Theory of numbers, Part I, Cambridge, 1892, p. 318.
Jonathan Sondow, Lerch Quotients, Lerch Primes, Fermat-Wilson Quotients, and the Wieferich-Non-Wilson Primes 2, 3, 14771, In: M. B. Nathanson, Combinatorial and Additive Number Theory, Springer, CANT 2011 and 2012. Also on arXiv, arXiv:1110.3113 [math.NT], 2011-2012.
Eric Weisstein's World of Mathematics, Wilson Prime.
Eric Weisstein's World of Mathematics, Integer Sequence Primes.
Wikipedia, Wilson prime.
Paul Zimmermann, Records for prime numbers.
MATHEMATICA
Select[Prime[Range[500]], Mod[(# - 1)!, #^2] == #^2 - 1 &] (* Harvey P. Dale, Mar 30 2012 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,hard,more,bref,nice
STATUS
approved
Lerch quotients of odd primes: ((Sum_{k=1..p-1} q_p(k)) - w_p)/p, where q_p(k) = (k^(p-1)-1)/p is a Fermat quotient, w_p = ((p-1)!+1)/p is a Wilson quotient, and p is the n-th prime, with n > 1.
+10
6
0, 13, 1356, 123229034, 79417031713, 97237045496594199, 166710337513971577670, 993090310179794898808058068, 60995221345838813484944512721637147449, 332049278209768881045237587717723153006704, 120846039713576242385812868532189241842793944235993733
OFFSET
2,2
COMMENTS
Lerch proved that the Lerch quotient of any odd prime is an integer.
Is 13 the only Lerch quotient that is itself prime?
No other primes below 300,000 digits. - Charles R Greathouse IV, Nov 16 2011
Proof that a(n) is an integer for n >= 2: Note that ((p-1)!)^(p-1) = Product_{i=1..p-1} (1+i^(p-1)-1) == 1+Sum_{i=1..p-1} (i^(p-1)-1) (mod p^2). Write (p-1)! = kp-1, then ((p-1)!)^(p-1) == 1-(p-1)*kp == kp+1 == (p-1)!+2 (mod p^2). This gives Sum_{i=1..p-1} (i^(p-1)-1) == (p-1)!+1 (mod p^2), or Sum_{i=1..p-1} (i^(p-1)-1)/p == ((p-1)!+1)/p (mod p). - Jianing Song, Oct 15 2019
LINKS
J. B. Dobson A note on Lerch primes, arXiv:1311.2242 [math.NT], 2014.
J. B. Dobson A Characterization of Wilson-Lerch Primes, Integers, 16 (2016), A51.
M. Lerch, Zur Theorie des Fermatschen Quotienten (a^(p-1)-1)/p = q(a), Math. Ann. 60 (1905), 471-490.
J. Sondow, Lerch Quotients, Lerch Primes, Fermat-Wilson Quotients, and the Wieferich-non-Wilson Primes 2, 3, 14771, in Proceedings of CANT 2011, arXiv:1110.3113 [math.NT], 2011-2012.
J. Sondow, Lerch Quotients, Lerch Primes, Fermat-Wilson Quotients, and the Wieferich-non-Wilson Primes 2, 3, 14771, Combinatorial and Additive Number Theory, CANT 2011 and 2012, Springer Proc. in Math. & Stat., vol. 101 (2014), pp. 243-255.
FORMULA
a(n) = ((Sum_{k=1..p-1} k^(p-1)) - p - (p-1)!)/p^2, where p is the n-th prime and n >= 2.
EXAMPLE
a(3) = 13 because the 3rd prime is 5 and ((Sum_{k=1..4} q_5(k)) - w_5)/5 = (0 + 3 + 16 + 51 - 5)/5 = 13.
MATHEMATICA
f[n_] := Block[{p = Prime[n]}, (Sum[(k^(p - 1) - 1)/p, {k, p - 1}] - ((p - 1)! + 1)/p)/p]; Array[f, 12, 2] (* Robert G. Wilson v, Dec 01 2016 *)
PROG
(PARI) a(n)=my(p=prime(n), m=p-1); sum(k=1, m, k^m, -p-m!)/p^2 \\ Charles R Greathouse IV, Oct 18 2011
CROSSREFS
KEYWORD
nonn
AUTHOR
Jonathan Sondow, Oct 16 2011
STATUS
approved
Lerch remainders: the Lerch quotient A197630 of the n-th prime p modulo p, where n > 1.
+10
4
0, 3, 5, 5, 6, 12, 13, 3, 7, 19, 2, 21, 34, 33, 52, 31, 51, 38, 32, 25, 25, 25, 53, 22, 98, 0, 79, 42, 63, 123, 75, 11, 11, 39, 34, 151, 36, 137, 22, 49, 19, 144, 41, 44, 21, 5, 122, 4, 111, 10, 228, 194, 148, 20, 217, 193, 157, 202, 152, 87, 93, 30, 219
OFFSET
2,2
LINKS
J. B. Dobson A note on Lerch primes, arXiv:1311.2242 [math.NT], 2014.
J. B. Dobson A Characterization of Wilson-Lerch Primes, Integers, 16 (2016), A51.
J. Sondow, Lerch Quotients, Lerch Primes, Fermat-Wilson Quotients, and the Wieferich-non-Wilson Primes 2, 3, 14771, in Proceedings of CANT 2011, arXiv:1110.3113 [math.NT], 2011-2012.
J. Sondow, Lerch Quotients, Lerch Primes, Fermat-Wilson Quotients, and the Wieferich-non-Wilson Primes 2, 3, 14771, Combinatorial and Additive Number Theory, CANT 2011 and 2012, Springer Proc. in Math. & Stat., vol. 101 (2014), pp. 243-255.
FORMULA
a(n) = A197630(n) mod Prime(n), with n >= 2.
EXAMPLE
a(3) = A197630(3) mod Prime(3) = 13 mod 5 = 3.
PROG
(PARI) a(n) = my(p=prime(n), m=p-1); sum(k=1, m, k^m, -p-m!)/p^2 % p;
vector(100, n, a(n+1)) \\ Altug Alkan, Nov 22 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jonathan Sondow, Oct 16 2011
STATUS
approved
Sum of Wilson and Lerch remainders of n-th prime.
+10
1
1, 3, 10, 6, 6, 17, 15, 11, 25, 38, 9, 37, 47, 39, 86, 58, 107, 50, 101, 36, 98, 45, 123, 92, 170, 57, 80, 72, 158, 194, 194, 67, 78, 133, 120, 302, 144, 158, 128, 97, 91, 303, 76, 191, 139, 178, 302, 117, 242, 179, 335, 390, 362, 197, 290, 314, 327, 227, 429
OFFSET
2,2
COMMENTS
a(n) = 0 if and only if prime(n) is in both A007540 and A197632, i.e., prime(n) is simultaneously a Wilson prime and a Lerch prime.
For n > 2, a(n) = 0 if and only if A027641(3*p-3) / A027642(3*p-3)-1 + 1/p == 0 (mod p^2), where p = prime(n) (cf. Dobson, 2016, theorem 2).
René Gy (see links) has shown that a number is simultaneously a Lerch prime and a Wilson prime if and only if it satisfies the congruence (p - 1)! + 1 == 0 (mod p^3). - John Blythe Dobson, Feb 23 2018
LINKS
John Blythe Dobson, A Characterization of Wilson-Lerch Primes, Integers, 16 (2016), A51.
René Gy, Generalized Lerch Primes, Integers 18 (2018), A10.
J. Sondow, Lerch Quotients, Lerch Primes, Fermat-Wilson Quotients, and the Wieferich-non-Wilson Primes 2, 3, 14771, in Proceedings of CANT 2011, arXiv:1110.3113 [math.NT], 2011-2012.
FORMULA
a(n) = A002068(n) + A197631(n).
MATHEMATICA
a[n_] := Module[{p = Prime[n]}, Mod[((p-1)!+1)/p, p] + Mod[(Sum[(k^(p-1)-1)/p, {k, 1, p-1}] - ((p-1)!+1)/p)/p, p]];
Table[a[n], {n, 2, 60}] (* Jean-François Alcover, Feb 15 2019 *)
PROG
(PARI) a002068(n) = my(p=prime(n)); ((p-1)!+1)/p % p
a197631(n) = my(p=prime(n), m=p-1); sum(k=1, m, k^m, -p-m!)/p^2 % p
a(n) = a002068(n) + a197631(n)
CROSSREFS
KEYWORD
nonn
AUTHOR
Felix Fröhlich, Aug 07 2016
STATUS
approved
Lerch pseudoprimes: composite numbers m such that Sum_{k=1..m-1} k^{m-1} - (m-1)! == m (mod m^2).
+10
1
77, 161, 2261, 12839, 14231, 18668831, 1591100357
OFFSET
1,1
COMMENTS
According to Lerch's congruence (1905), if p is an odd prime, then Sum_{k=1..p-1} k^(p-1) - (p-1)! == p (mod p^2).
Equivalently, numbers m > 4 such that Sum_{k=1..m-1} k^(m-1) == m (mod m^2).
Equivalently, numbers m > 1 such that m*B_{m-1} == m (mod m^2), where B_k is the k-th Bernoulli number.
Equivalently, terms m of A121707 such that B_{m-1} == 1 (mod m).
Equivalently, numbers m > 1 such that A027641(m-1) == A027642(m-1) (mod m).
If m is a Lerch pseudoprime, then p-1 does not divide m-1 for every prime divisor p of m.
From M. F. Hasler, Jul 22 2019: (Start)
The Lerch primes A197632 satisfy Lerch's congruence "even" modulo p^3.
Up to a(7) all terms are either multiples of 7 or of 37, but not both. Will this pattern prevail?
We also note: a(1) = 7*11; a(2) = 7*(2*11 + 1) = a(1)/11*23; a(3) = 7*(2*7*23 + 1) = a(2)/23*17*19, a(5) = a(3)/17*107, i.e., a term in this subsequence has all but one of the prime factors of the preceding one. The subsequence (a(4), a(6), ...?) of terms divisible by 37 so far consists of semiprimes and therefore also has this property. (End)
LINKS
Mathias Lerch, Zur Theorie des Fermatschen Quotienten (a^(p-1)-1)/p = q(a), Mathematische Annalen, Vol. 60, No. 4 (1905), pp. 471-490.
Jonathan Sondow, Lerch quotients, Lerch primes, Fermat-Wilson quotients, and the Wieferich-non-Wilson primes 2, 3, 14771, In: Nathanson M. (eds) Combinatorial and Additive Number Theory. Springer Proceedings in Mathematics & Statistics, Vol. 101, Springer, New York, NY, 2014, pp. 243-255. Preprint: arXiv:1110.3113 [math.NT].
MATHEMATICA
s={}; Do[If[CompositeQ[n] && Mod[Sum[PowerMod[k, n-1, n^2], {k, 1, n-1}] - (n-1)! - n, n^2] == 0, AppendTo[s, n]], {n, 1, 2500}] ; s
PROG
(PARI) is_A308963(m)={sum(k=1, m-1, Mod(k, m^2)^(m-1))==m&&!isprime(m)&&m>4}
forcomposite(m=1, , is_A308963(m)&&print1(m", ")) \\ Slow beyond 10000. - M. F. Hasler, Jul 22 2019
CROSSREFS
A subsequence of A191677 and A121707.
KEYWORD
nonn,more
AUTHOR
Amiram Eldar and Thomas Ordowski, Jul 03 2019
EXTENSIONS
a(6)-a(7) from Max Alekseyev, Jul 09 2019
STATUS
approved
Odd prime numbers p such that p*Bernoulli(p-1) + (p-1)!*(p-1) == 0 (mod p^3).
+10
0
17, 1733, 18433
OFFSET
1,1
COMMENTS
For all other odd primes, the congruence holds mod p^2 only.
PROG
(PARI) lista(nn) = {forprime(p=3, nn, if (!((p*bernfrac(p-1) + (p-1)!*(p-1)) % p^3) , print1(p, ", ")); ); } \\ Michel Marcus, Sep 18 2016
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
René Gy, Sep 18 2016
STATUS
approved
Primes p such that W_p == 2 (mod p), where W_p = A007619(n) and p = prime(n).
+10
0
19, 1187, 14296621, 16556218163369
OFFSET
1,1
COMMENTS
These are the members of René Gy's set W_2 (cf. Gy, 2018).
The sequence is complete to 2*10^13, with the higher terms coming from a list of primes with small Wilson quotients in the article by Costa, Gerbicz, and Harvey. - John Blythe Dobson, Jan 05 2021
LINKS
Edgar Costa, Robert Gerbicz, and David Harvey, A search for Wilson primes, Mathematics of Computation 83 (2014) 3071-3091.
R. Gy, Generalized Lerch Primes, Integers: Electronic Journal of Combinatorial Number Theory 18, (2018), #A10.
PROG
(PARI) forprime(p=1, , if(Mod(((p-1)!+1)/p, p)==2, print1(p, ", ")))
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Felix Fröhlich, Sep 08 2018
STATUS
approved
Primes p such that Sum_{k=1..p-1} q^2_p(k) == 0 (mod p), with q_p(k) a Fermat quotient.
+10
0
OFFSET
1,1
COMMENTS
The congruence in the definition is given in Gy, 2018, Eq. 16.
The terms, except for the prime 2, satisfy the congruence B_{p-1} - 1 + 1/p == (B_{2p-2} - 1 + 1/p)/2 (mod p^2), with B_i a Bernoulli number (cf. Gy, 2018, Eq. 18).
Any odd prime that is a term of both A007540 and A197632, i.e., that is simultaneously a Wilson prime and a Lerch prime, is in this sequence (cf. Gy, 2018, Theorem 5).
An equivalent definition, better suited for computational purposes, is: "Primes p such that Sum_{k=1..p-1} (k^(p-1) - 1)^2 == 0 (mod p^3)." - John Blythe Dobson, Apr 30 2024
a(4) > 427000, if it exists (Gy, 2018). - Amiram Eldar, Aug 22 2023
a(4) > 39540000, if it exists. - John Blythe Dobson, Apr 30 2024
LINKS
René Gy, Generalized Lerch primes, INTEGERS, 18 (2018), #A10.
MATHEMATICA
Join[{2}, Select[Prime[Range[2, 200]], Divisible[Numerator[BernoulliB[# - 1] - 1 + 1/# - (BernoulliB[2*# - 2] - 1 + 1/#)/2], #^2] &]] (* Amiram Eldar, Aug 22 2023 *)
PROG
(PARI) forprime(p = 2, 10000, if(sum(j=1, p-1, (Mod(j, p^3)^(p-1) - 1)^2) % p^3 == 0, print1(p, ", "))) /* John Blythe Dobson, Apr 30 2024 */
CROSSREFS
KEYWORD
nonn,hard,more,bref
AUTHOR
Felix Fröhlich, Aug 21 2023
STATUS
approved

Search completed in 0.015 seconds