OFFSET
1,2
COMMENTS
It follows from a theorem of Daniel Shiu that k always exists. Shiu has proved that if (a,b) = 1 then the arithmetic progression a, a + b, ..., a + k*b, ... contains arbitrarily long sequences of consecutive primes. Since, for any positive integer b, there are thus arbitrarily long sequences of consecutive primes congruent to 1 mod b, there must be infinitely many a(n) that are divisible by b.
To clarify the previous comment: If the sum of the primes up to some point is s (mod b), then we need exactly b-s consecutive primes equal to 1 (mod b) to produce a sum divisible by b. Hence when there are b-1 consecutive primes congruent to 1 (mod b), then the sum of primes up to one of those primes will be divisible by b. - T. D. Noe, Dec 02 2009
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
D. K. L. Shiu, Strings of Congruent Primes, J. Lond. Math. Soc. 61 (2) (2000) 359-373 [MR1760689]
EXAMPLE
MAPLE
read transforms; M:=1000; p0:=[seq(ithprime(i), i=1..M)]; q0:=PSUM(p0); w:=[]; for n from 1 to M do p:=p0[n]; hit := 0; for i from 1 to M do if q0[i] mod p = 0 then w:=[op(w), i]; hit:=1; break; fi; od: if hit = 0 then break; fi; od: w;
MATHEMATICA
Table[p=Prime[n]; s=0; k=0; While[k++; s=Mod[s+Prime[k], p]; s>0]; k, {n, 10}] (* T. D. Noe, Dec 02 2009 *)
PROG
(PARI) A111287(n)= n=Mod(0, prime(n)); for(k=1, 1e9, (n+=prime(k)) || return(k)) \\ M. F. Hasler, Nov 29 2009
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Nov 03 2005
EXTENSIONS
The comments are based on correspondence with Paul Pollack and a posting to sci.math by Fred Helenius.
Typo in reference fixed by David Applegate, Dec 18 2009
STATUS
approved