%I #68 Oct 06 2021 13:24:11
%S 3,103,839,2237
%N Lerch primes: odd primes that divide their Lerch quotients A197630.
%C Odd primes p such that Sum_{a=1..p-1} a^(p-1) - (p-1)! == p (mod p^3). (The congruence holds mod p^2 for any odd prime p; see Lerch (1905).)
%C Marek Wolf has computed that if a 5th Lerch prime p exists, then 4496113 < p < 18816869 or 18977773 < p < 32452867 or p > 32602373.
%C Can a number be simultaneously a Lerch prime and a Wilson prime A007540?
%C 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
%C Named after the Czech mathematician Mathias Lerch (1860-1922). - _Amiram Eldar_, Jun 23 2021
%H John Blythe Dobson, <a href="http://arxiv.org/abs/1311.2242">A note on Lerch primes</a>, arXiv:1311.2242 [math.NT], 2014.
%H John Blythe Dobson, <a href="http://www.integers-ejcnt.org/q51/q51.Abstract.html">A Characterization of Wilson-Lerch Primes</a>, Integers, Vol. 16 (2016), A51.
%H René Gy, <a href="http://math.colgate.edu/~integers/s10/s10.mail.html">Generalized Lerch Primes</a>, Integers, Vol. 18 (2018), A10.
%H M. Lerch, <a href="https://eudml.org/doc/158206">Zur Theorie des Fermatschen Quotienten (a^(p-1)-1)/p = q(a)</a>, Mathematische Annalen, Vol. 60, No. 4 (1905), pp. 471-490.
%H Jonathan Sondow, <a href="https://doi.org/10.1007/978-1-4939-1601-6_17">Lerch quotients, Lerch primes, Fermat-Wilson quotients, and the Wieferich-non-Wilson primes 2, 3, 14771</a>, In: M. Nathanson (ed.), Combinatorial and Additive Number Theory. Springer Proceedings in Mathematics & Statistics, Vol. 101, Springer, New York, NY, 2014, pp. 243-255, <a href="https://arxiv.org/abs/1110.3113">preprint</a>, arXiv:1110.3113 [math.NT], 2011-2012.
%F A197630(A000720(a(n))) == 0 (mod a(n)).
%F A197631(A000720(a(n))) = 0.
%e The 27th prime is 103, and A197631(27) = 0, so 103 is a member.
%t Cases[Prime[Range[2, 500]], p_ /; Divisible[(Sum[(k^(p-1)-1)/p, {k, 1, p-1}] - ((p-1)! + 1)/p)/p, p]] (* _Jean-François Alcover_, Nov 21 2018 *)
%o (PARI) is(p)=my(m=p-1,P=p^3); !sum(k=1, m, Mod(k,P)^m,-p-m!) && isprime(p) \\ _Charles R Greathouse IV_, Jun 18 2012
%Y Cf. A000720, A007540, A197630, A197631, A308963.
%K nonn,more
%O 1,1
%A _Jonathan Sondow_, Oct 16 2011