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.

A182121 Primes p such that the sum of both three and five consecutive primes starting with p is prime.

Original entry on oeis.org

5, 7, 11, 19, 29, 31, 53, 67, 79, 109, 149, 157, 163, 211, 229, 311, 349, 379, 401, 409, 449, 467, 653, 757, 809, 839, 857, 863, 883, 983, 997, 1033, 1087, 1103, 1187, 1193, 1289, 1301, 1303, 1409, 1481, 1523, 1553, 1637, 1663, 1669, 1709, 1951, 1973
Offset: 1

Views

Author

Zak Seidov, Dec 17 2012

Keywords

Examples

			5 is in the sequence because 5 + 7 + 11 = 23 is prime and 5 + 7 + 11 + 13 + 17 = 53 is also prime.
		

Crossrefs

Intersection of A073681 and A152468.

Programs

  • Mathematica
    cpQ[n_]:=Module[{ppi=PrimePi[n],cnsc},cnsc=Prime[Range[ppi,ppi+4]];And@@ PrimeQ[ {Total[cnsc],Total[Take[cnsc,3]]}]]; Select[Prime[Range[300]],cpQ] (* Harvey P. Dale, Mar 28 2013 *)
    Select[Partition[Prime[Range[500]],5,1],AllTrue[{Total[Take[#,3]],Total[#]},PrimeQ]&][[;;,1]] (* Harvey P. Dale, Feb 11 2024 *)
  • PARI
    {a=2;b=3;c=5;d=7;e=11;for(n=1,300,s=a+b+c+d+e;
    if(isprime(s)&&isprime(a+b+c),print1(a","));a=b;b=c;c=d;d=e;e=nextprime(e+2))}