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.

A288041 Numbers k such that prime(k) + prime(k+1) + ... + prime(k+4) is prime.

Original entry on oeis.org

3, 4, 5, 6, 8, 10, 11, 14, 16, 17, 19, 21, 22, 28, 29, 30, 31, 33, 35, 36, 37, 38, 41, 43, 47, 48, 50, 56, 57, 63, 64, 70, 71, 72, 75, 76, 79, 80, 81, 84, 86, 87, 89, 91, 92, 98, 99, 100, 102, 104, 105, 106, 109, 112, 114, 119, 123, 125, 134, 140, 141, 142, 146, 148, 149, 150
Offset: 1

Views

Author

Zak Seidov, Jun 04 2017

Keywords

Crossrefs

Cf. A000720 (PrimePi), A072225 (numbers n such that prime(n) + prime(n+1) + prime(n+2) is prime), A073681 (smallest of three consecutive primes whose sum is a prime), A152468 (smallest of five consecutive primes whose sum is a prime).

Programs

  • Mathematica
    With[{nn = 154}, Function[s, Select[Range[nn - 4], PrimeQ@ Total@ Take[s, {#, # + 4}] &]]@ Prime@ Range@ nn] (* Michael De Vlieger, Jun 06 2017 *)
    Position[Total/@Partition[Prime[Range[200]],5,1],?(PrimeQ[#]&)]//Flatten (* _Harvey P. Dale, Sep 09 2024 *)
  • PARI
    list(lim)=my(v=List(),u=primes(5),n=1); forprime(p=13,, if(n++>lim, break); u=concat(u[2..5],p); if(isprime(vecsum(u)), listput(v,n))); Vec(v) \\ Charles R Greathouse IV, Jun 10 2017

Formula

a(n) = pi(A152468(n)) = A000720(A152468(n)).