OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
5 is in the sequence because 5 + 7 + 11 = 23 is prime and 5 + 7 + 11 + 13 + 17 = 53 is also prime.
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 *)
PROG
(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))}
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Dec 17 2012
STATUS
approved