

A115209


a(0)=1. a(n) = number of earlier terms of the sequence which when added to n produce a composite number.


4



1, 0, 0, 1, 2, 2, 4, 4, 8, 4, 8, 5, 9, 8, 12, 7, 13, 12, 14, 12, 19, 16, 17, 17, 18, 17, 22, 20, 23, 17, 21, 24, 29, 25, 29, 25, 25, 29, 31, 28, 33, 32, 27, 34, 34, 34, 36, 37, 40, 36, 39, 41, 43, 43, 38, 42, 47, 47, 46, 44, 45, 48, 49, 48, 51, 49, 49, 49, 59, 54, 58, 55, 54, 59
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,5


LINKS

Diana Mecum, Table of n, a(n) for n = 0..200


EXAMPLE

Adding 6 to the first 6 terms (terms 0 through 5) of the sequence gives [7,6,6,7,8,8]. Of these terms, four are composite, so a(6) = 4.


MATHEMATICA

a = {1}; For[n = 1, n < 90, n++, in = 0; For[j = 1, j < Length[a] + 1, j++, If[ ! PrimeQ[n + a[[j]]], in++ ]]; AppendTo[a, in]]; a (* Stefan Steinerberger, Jun 03 2007 *)


CROSSREFS

Cf. A115207, A115208, A115210.
Sequence in context: A005852 A274625 A292253 * A139210 A300123 A175359
Adjacent sequences: A115206 A115207 A115208 * A115210 A115211 A115212


KEYWORD

nonn


AUTHOR

Leroy Quet, Jan 16 2006


EXTENSIONS

More terms from Stefan Steinerberger and Diana L. Mecum, Jun 03 2007


STATUS

approved



