The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A152470 Largest of three consecutive primes whose sum is a prime. 7
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
3+5+7 = 15 is composite.
5+7+11 = 23 is prime and (5, 7, 11) are consecutive primes so a(1) = 11.
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
PROG
(PFGW & SCRIPT)
SCRIPT
DIM n, 0
OPENFILEOUT myf, a(n).txt
LABEL loop1
SET n, n+1
PRP p(n)+p(n+1)+p(n+2)
IF ISPRP then GOTO a
GOTO loop1
LABEL a
WRITE myf, t
GOTO loop1
# Pierre CAMI, Aug 30 2014
(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
CROSSREFS
Sequence in context: A087681 A137669 A360979 * A191023 A078861 A106891
KEYWORD
nonn
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 26 16:43 EDT 2024. Contains 372840 sequences. (Running on oeis4.)