

A123541


a(0) = 2; for n > 0, a(n) = number of earlier terms which when added to n give a prime.


5



2, 1, 1, 1, 3, 1, 4, 1, 1, 2, 7, 2, 7, 1, 1, 4, 11, 3, 9, 2, 4, 4, 11, 0, 2, 4, 4, 11, 11, 6, 14, 2, 5, 7, 6, 8, 16, 10, 4, 15, 13, 9, 13, 10, 5, 9, 14, 5, 9, 9, 11, 10, 17, 6, 9, 11, 13, 19, 20, 11, 22, 8, 17, 14, 13, 14, 20, 13, 13, 22, 23, 9, 20, 8, 12, 16, 11, 13, 21, 13, 13, 16, 14, 12, 16, 15
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,1


LINKS

T. D. Noe, Table of n, a(n) for n = 0..2000


FORMULA

a(n) = A114897(n+1) for n>2.  T. D. Noe, Apr 30 2007


MAPLE

M:=100; a:=array(0..M); a[0]:=2; for n from 1 to M do t1:=0; for i from 0 to n1 do if isprime(n+a[i]) then t1:=t1+1; fi; od: a[n]:=t1; od: [seq(a[n], n=0..M)];


MATHEMATICA

t={2}; Do[AppendTo[t, Length[Select[t+n, PrimeQ]]], {n, 2000}]; t (* T. D. Noe, Apr 30 2007 *)


CROSSREFS

Cf. A114899
Sequence in context: A060247 A060246 A161204 * A324537 A090379 A254655
Adjacent sequences: A123538 A123539 A123540 * A123542 A123543 A123544


KEYWORD

nonn


AUTHOR

N. J. A. Sloane, based on email from Zak Seidov, Oct 16 2006


STATUS

approved



