OFFSET
1,1
COMMENTS
See A132809 for another version.
In some cases (n=1,2,25,..), like a(25)=97, the sum of 25 consecutive primes starts with the 25th prime and is divided by 25: Sum=97+...+227=3925=25*157
LINKS
Zak Seidov, Table of n, a(n) for n = 1..1000
FORMULA
Min[q_1; Sum[q_i; {i, 1, n}]]=n*X], q_i is a prime (rarely only q_i=Prime[i])
EXAMPLE
a(8) = 17 since the sum of the 8 consecutive primes starting with 17 is 17 + 19 + 23 + 29 + 31 + 37 + 41 + 43 = 240, which is divisible by 8. No prime less than 17 has this property: for example, 7 + 11 + ... + 31 = 150 which is not divisible by 8.
MATHEMATICA
f[n_] := Block[{k = 1, t}, While[t = Table[Prime[i], {i, k, k + n - 1}]; Mod[Plus @@ t, n] > 0, k++ ]; t]; First /@ Table[f[n], {n, 67}] (* Ray Chandler, Oct 09 2006 *)
Module[{prs=Prime[Range[250]]}, Table[SelectFirst[Partition[prs, n, 1], Mod[Total[#], n]==0&], {n, 70}]][[;; , 1]] (* Harvey P. Dale, Jul 11 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, May 23 2000
STATUS
approved