OFFSET
1,1
COMMENTS
a(n)=3 for n=850 and 55154 (and presumably infinitely many others).
LINKS
Robert Israel, Table of n, a(n) for n = 1..9332
EXAMPLE
a(4)=37 because prime(4)=7 divides the sum of 4 consecutive primes starting with 37 (37+41+43+47=168), but does not divide any earlier sum of 4 consecutive primes.
MAPLE
P:= [0, seq(ithprime(i), i=1..100000)]:
S:= ListTools:-PartialSums(P):
f:= proc(n) local p, k;
p:= ithprime(n);
for k from 1 to nops(S)-n do
if S[k+n]-S[k] mod p = 0 then
return P[k+1]
fi
od;
FAIL
end proc:
map(f, [$1..200]);
MATHEMATICA
a[n_] := Block[{m=Prime@n, s=Sum[Prime@i, {i, n}], p=2, q}, q=m; While[Mod[s, m] > 0, s-=p; {p, q} = NextPrime@{p, q}; s+=q]; p]; Array[a, 70] (* Giovanni Resta, Oct 10 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Oct 09 2019
STATUS
approved