%I #13 Sep 16 2015 00:34:53
%S 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,
%T 23,17,21,24,29,25,29,25,25,29,31,28,33,32,27,34,34,34,36,37,40,36,39,
%U 41,43,43,38,42,47,47,46,44,45,48,49,48,51,49,49,49,59,54,58,55,54,59
%N a(0)=1. a(n) = number of earlier terms of the sequence which when added to n produce a composite number.
%H Diana Mecum, <a href="/A115209/b115209.txt">Table of n, a(n) for n = 0..200</a>
%e 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.
%t 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 *)
%Y Cf. A115207, A115208, A115210.
%K nonn
%O 0,5
%A _Leroy Quet_, Jan 16 2006
%E More terms from _Stefan Steinerberger_ and _Diana L. Mecum_, Jun 03 2007