login
A328264
a(n) is the least prime p such that prime(n) divides the sum of n consecutive primes starting with p.
1
2, 5, 2, 37, 83, 17, 7, 23, 13, 67, 163, 821, 227, 7, 13, 151, 599, 643, 271, 2, 83, 19, 83, 1069, 61, 37, 823, 263, 23, 857, 89, 1931, 139, 181, 71, 239, 1861, 739, 487, 37, 1237, 3833, 37, 6961, 1709, 499, 587, 271, 2687, 359, 5, 727, 73, 491, 73, 41, 3989, 797, 2083, 1451, 199, 349, 2027, 2441
OFFSET
1,1
COMMENTS
a(n)=3 for n=850 and 55154 (and presumably infinitely many others).
LINKS
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
Cf. A024011 (a(n)=2).
Sequence in context: A019295 A364820 A373146 * A170908 A229029 A055385
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Oct 09 2019
STATUS
approved