OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..141
EXAMPLE
a(3) = 3 because the sum of the 2*3=6 consecutive primes starting at 3 is 3+5+7+11+13+17 = 56 = 7*(7+1) where 7 is prime.
a(4) = 977 because the sum of the 2*4=8 consecutive primes starting at 977 is 977+983+991+997+1009+1013+1019+1021 = 8010 = 89*(89+1) where 89 is prime.
MAPLE
N:= 10^5:
P:= select(isprime, [2, seq(i, i=3..N, 2)]):
S:= ListTools:-PartialSums([0, op(P)]):
nP:= nops(S):
f:= proc(n) local i;
for i from 1 to nP-n do
if issqr(1+4*(S[i+n]-S[i])) and isprime((sqrt(1+4*(S[i+n]-S[i]))-1)/2)then return P[i] fi
od;
FAIL
end proc:
R:= NULL:
for i from 1 do
v:= f(2*i);
if v = FAIL then break fi;
R:= R, v
od:
R;
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Dec 20 2020
STATUS
approved