A152469 Second smallest of three consecutive primes whose sum is a prime.
7, 11, 13, 19, 23, 29, 31, 37, 43, 59, 67, 71, 73, 83, 89, 103, 113, 149, 151, 163, 167, 199, 223, 233, 277, 283, 293, 307, 313, 347, 349, 353, 383, 397, 409, 419, 433, 457, 461, 467, 479, 499, 503, 521, 557, 619, 643, 659, 661, 673, 709, 727, 751, 757, 761
Offset: 1
Keywords
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Programs
-
Maple
t0:=[]; t1:=[]; t2:=[]; t3:=[]; for i from 1 to 1000 do t3:=ithprime(i)+ithprime(i+1)+ithprime(i+2); if isprime(t3) then t0:=[op(t0),i]; t1:=[op(t1),ithprime(i)]; t2:=[op(t2),ithprime(i+1)]; t3:=[op(t2),ithprime(i+2)]; fi; od: t2;
-
Mathematica
lst={};Do[p0=Prime[n];p1=Prime[n+1];p2=Prime[n+2];If[PrimeQ[p0+p1+p2],AppendTo[lst,p1]],{n,6!}];lst Select[Partition[Prime[Range[200]],3,1],PrimeQ[Total[#]]&][[All,2]] (* Harvey P. Dale, May 08 2021 *)