OFFSET
1,2
COMMENTS
Does a(n) ever take 0 as a value?
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
EXAMPLE
20 + (2 + 3 + 5 + 7) = 37, a prime and 4 consecutive primes starting with 2 are required to achieve this. So a(20) = 4.
MATHEMATICA
nt = 200; a = Table[0, {i, 1, nt}]; For[n = 1, n <= nt, n++, {i = 1; s = n + Prime[i]; While[Not[PrimeQ[s]] && (i < 1000), {i++; s = s + Prime[i]}]; a[[n]] = i}]; a
PROG
(PARI) { for (n=1, 1000, k=0; b=0; s=n; while(b==0, k++; s+=prime(k); if (isprime(s), b=1)); write("b066753.txt", n, " ", k) ) } \\ Harry J. Smith, Mar 22 2010
CROSSREFS
KEYWORD
nonn
AUTHOR
Joseph L. Pe, Jan 16 2002
EXTENSIONS
Edited by John W. Layman, Jan 23 2002
STATUS
approved