%I #26 May 27 2018 13:31:05
%S 1,3,2,2,1,1,2,2,1,1,2,2,1,1,2,1,1,1,1,2,2,1,1,1,1,2,1,1,2,2,1,1,2,1,
%T 1,1,1,2,1,1,1,1,2,2,1,1,1,1,2,1,1,2,2,1,1,1,1,2,1,1,2,1,1,1,1,2,1,1,
%U 1,1,1,1,2,1,1,2,2,1,1,2,2,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,2,1,1,1,1,2
%N First differences of nonprimes (including 0 and 1, A002808).
%C Sum of first n terms equals n-th nonprime number.
%C First differences of A141468. - Omar E. Pol, Oct 21 2011
%H Harvey P. Dale, <a href="/A054546/b054546.txt">Table of n, a(n) for n = 1..1000</a>
%F a(n) = A018252(n) - A141468(n). - Omar E. Pol, Oct 21 2011
%t t=Flatten[Position[Table[PrimeQ[w], {w, 2, 256}], False]]+1 Delete[t-RotateRight[t], 1]
%t Differences[Select[Range[0,200],!PrimeQ[#]&]] (* _Harvey P. Dale_, May 27 2018 *)
%Y Cf. A141468, A066110, A001223
%K nonn,easy
%O 1,2
%A _G. L. Honaker, Jr._, Apr 09 2000
%E More terms from _James A. Sellers_, Apr 11 2000
|