OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
5^2 + 7^2 + 11^2 = 195 is a sum of the squared consecutive primes 5, 7 and 11, and 193 and 197 are primes, so 195 is a member of the sequence.
MAPLE
q:= 2: r:= 3: R:= NULL: count:= 0:
while count < 100 do
p:= q; q:= r; r:= nextprime(r);
s:= p^2+q^2+r^2;
if isprime(s-2) and isprime(s+2) then
count:= count+1; R:= R, s;
fi;
od:
R; # Robert Israel, Apr 21 2023
MATHEMATICA
lst={}; Do[p=Prime[n]^2+Prime[n+1]^2+Prime[n+2]^2; If[PrimeQ[p-2]&&PrimeQ[p+2], AppendTo[lst, p]], {n, 8!}]; lst
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, Aug 10 2009
EXTENSIONS
Comment turned into example by R. J. Mathar, Aug 27 2009
STATUS
approved