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.

A152470 Largest of three consecutive primes whose sum is a prime.

Original entry on oeis.org

11, 13, 17, 23, 29, 31, 37, 41, 47, 61, 71, 73, 79, 89, 97, 107, 127, 151, 157, 167, 173, 211, 227, 239, 281, 293, 307, 311, 317, 349, 353, 359, 389, 401, 419, 421, 439, 461, 463, 479, 487, 503, 509, 523, 563, 631, 647, 661, 673, 677, 719, 733, 757, 761, 769
Offset: 1

Views

Author

Keywords

Examples

			3+5+7 = 15 is composite.
5+7+11 = 23 is prime and (5, 7, 11) are consecutive primes so a(1) = 11.
		

Crossrefs

Programs

  • Maple
    Primes:= select(isprime,[2,(2*i+1 $ i=1..10000)]):
    Primes[select(t -> isprime(Primes[t-2]+Primes[t-1]+Primes[t]),[$3..nops(Primes)])];
    # Robert Israel, Aug 29 2014
  • Mathematica
    lst={};Do[p0=Prime[n];p1=Prime[n+1];p2=Prime[n+2];If[PrimeQ[p0+p1+p2],AppendTo[lst,p2]],{n,6!}];lst
  • PARI
    s=[]; for(n=1, 1000, if(isprime(prime(n)+prime(n+1)+prime(n+2)), s=concat(s, prime(n+2)))); s \\ Colin Barker, Aug 25 2014