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.

Showing 1-5 of 5 results.

A197632 Lerch primes: odd primes that divide their Lerch quotients A197630.

Original entry on oeis.org

3, 103, 839, 2237
Offset: 1

Views

Author

Jonathan Sondow, Oct 16 2011

Keywords

Comments

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).)
Marek Wolf has computed that if a 5th Lerch prime p exists, then 4496113 < p < 18816869 or 18977773 < p < 32452867 or p > 32602373.
Can a number be simultaneously a Lerch prime and a Wilson prime A007540?
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
Named after the Czech mathematician Mathias Lerch (1860-1922). - Amiram Eldar, Jun 23 2021

Examples

			The 27th prime is 103, and A197631(27) = 0, so 103 is a member.
		

Crossrefs

Programs

  • Mathematica
    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 *)
  • 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

Formula

A197630(A000720(a(n))) == 0 (mod a(n)).
A197631(A000720(a(n))) = 0.

A197631 Lerch remainders: the Lerch quotient A197630 of the n-th prime p modulo p, where n > 1.

Original entry on oeis.org

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

Views

Author

Jonathan Sondow, Oct 16 2011

Keywords

Examples

			a(3) = A197630(3) mod Prime(3) = 13 mod 5 = 3.
		

Crossrefs

Programs

  • 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

Formula

a(n) = A197630(n) mod Prime(n), with n >= 2.

A222207 Morley quotients: (2^(2*p-2) - (-1)^((p-1)/2)*binomial(p-1,(p-1)/2)) / p^3, where p = prime(n) and n >= 3.

Original entry on oeis.org

2, 12, 788, 7636, 874202, 10018884, 1445893544, 2954512034024, 38700329118256, 93229749133527532, 17540746936557672236, 243284404062970619608, 47694250379410432495952, 136236017676683906365850456, 404504597532158799519693872144, 5856120097210409121404621878992, 18102352585707069737371994385420772, 3894254646848417473467131712404310728
Offset: 3

Views

Author

Jonathan Sondow, Feb 22 2013

Keywords

Comments

Morley (1894/95) proved 2^(2*p-2) == (-1)^((p-1)/2)*binomial(p-1,(p-1)/2) mod p^3 for all primes p > 3.
Morley quotients are even, since 2^(2*p-2) and binomial(p-1,(p-1)/2) are even and p^3 is odd.

Examples

			prime(3) = 5, so a(3) = (2^(2*5-2) - (-1)^((5-1)/2)*binomial(5-1,(5-1)/2))/5^3 = (2^8 - binomial(4,2))/5^3 = (256-6)/125 = 2.
		

Crossrefs

Programs

  • Mathematica
    m[p_] := (2^(2*p-2) - (-1)^((p-1)/2)*Binomial[p-1, (p-1)/2])/p^3; Table[ m[ Prime[n]], {n, 3, 20}]

A308963 Lerch pseudoprimes: composite numbers m such that Sum_{k=1..m-1} k^{m-1} - (m-1)! == m (mod m^2).

Original entry on oeis.org

77, 161, 2261, 12839, 14231, 18668831, 1591100357
Offset: 1

Views

Author

Amiram Eldar and Thomas Ordowski, Jul 03 2019

Keywords

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)

Crossrefs

A subsequence of A191677 and A121707.

Programs

  • 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
  • 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

Extensions

a(6)-a(7) from Max Alekseyev, Jul 09 2019

A229833 1/p^3 * numerator((sum_{j=1..p-1} j^(p-1)) - p*Bernoulli(p-1)) with p = prime(n).

Original entry on oeis.org

17, 1175, 67232195, 1282936297603, 171594913930219489, 368517627392700495869, 259067037992493907740808871, 63098504840897942292160460526547792021, 4948605372033572359620687688871811178548595, 169413083241708480729625174442441002390094469490644564301, 90165569601996395473034926239938857618854516797194687641929891
Offset: 3

Views

Author

Jonathan Sondow, Oct 16 2013

Keywords

Comments

Sum_{j=1..p-1} j^(p-1) == p*Bernoulli(p-1) (mod p^3) for prime p > 3 (see formulas (8) and (10) in "Lerch Quotients, ..."), so a(n) is an integer for n > 2.

Examples

			Prime(3) = 5 and 1/5^3 * numerator((sum_{j=1..4} j^4) - 5*Bernoulli(4)) = 1/125 * numerator(354 - 5*(-1/6)) = 2125/125 = 17, so a(3) = 17.
		

Crossrefs

Cf. A197630.

Programs

  • Mathematica
    Table[p = Prime[n]; Numerator[ Sum[j^(p - 1), {j, 1, p - 1}] - p*BernoulliB[p - 1]]/p^3, {n, 3, 13}]
Showing 1-5 of 5 results.