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-2 of 2 results.

A340408 Primes p such that p*q+q*r+r*s is prime, where q,r,s are the next primes after p.

Original entry on oeis.org

3, 17, 19, 23, 43, 151, 157, 199, 229, 233, 331, 347, 461, 467, 491, 503, 523, 547, 563, 613, 617, 619, 653, 739, 743, 773, 941, 1021, 1031, 1051, 1063, 1097, 1103, 1117, 1163, 1193, 1237, 1259, 1279, 1373, 1429, 1489, 1523, 1553, 1601, 1609, 1613, 1627, 1663, 1709, 1733, 1907, 1999, 2011, 2087
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Jan 06 2021

Keywords

Examples

			a(3) = 19 is a term because 19*23+23*29+29*31 = 2003 is prime.
		

Crossrefs

Cf. A287653.

Programs

  • Maple
    q:= 2: r:= 3: s:= 5:
    count:= 0: R:= NULL:
    while count < 100 do
      p:= q; q:= r; r:= s; s:= nextprime(s);
      if isprime(p*q+q*r+r*s) then count:= count+1; R:= R, p;  fi
    od:
    R;
  • Python
    from sympy import isprime, nextprime
    def aupton(terms):
      p, q, r, s, alst = 2, 3, 5, 7, []
      while len(alst) < terms:
        if isprime(p*q + q*r + r*s): alst.append(p)
        p, q, r, s = q, r, s, nextprime(s)
      return alst
    print(aupton(55)) # Michael S. Branicky, Mar 17 2021

A340537 Primes that are sums of a sequence of consecutive terms of A006094.

Original entry on oeis.org

127, 491, 1201, 1427, 2003, 2713, 2767, 5431, 7229, 7639, 13001, 17231, 18061, 20753, 24509, 37337, 37589, 38149, 38261, 44563, 44839, 50969, 51517, 53609, 55201, 60859, 76519, 77191, 80239, 80783, 81703, 90823, 91583, 96493, 103079, 103687, 110573, 126713, 130411, 134093, 137777, 139199, 139663
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Jan 10 2021

Keywords

Comments

Each term is the sum of at least three consecutive terms of A006094.
A number that can be expressed as such a sum in more than one way is only listed once. The first such number is 50911291 = 547*557+...+1051*1061 = 1423*1427+...+1559*1567.

Examples

			a(1) = 5*7+7*11+11*13 = 127.
a(2) = 5*7+7*11+11*13+13*17+17*19 = 491.
a(3) = 11*13+13*17+17*19+19*23+23*29 = 1201.
a(4) = 19*23+23*29+29*31 = 1427.
		

Crossrefs

Cf. A006094, A340465. Includes A287653.

Programs

  • Maple
    SP:= [seq(ithprime(i)*ithprime(i+1),i=1..100)]:
    SSP:= ListTools:-PartialSums([0,op(SP)]):
    select(t -> t <= SP[-1] and isprime(t),
      {seq(seq(SSP[j]-SSP[i],i=1..j-3),j=4..nops(SSP))});
Showing 1-2 of 2 results.