OFFSET
1,1
LINKS
Pierre CAMI, Table of n, a(n) for n = 1..10000
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
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, Dec 05 2008
STATUS
approved