login
A054546
First differences of nonprimes (including 0 and 1, A002808).
11
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, 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, 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
OFFSET
1,2
COMMENTS
Sum of first n terms equals n-th nonprime number.
First differences of A141468. - Omar E. Pol, Oct 21 2011
LINKS
FORMULA
a(n) = A018252(n) - A141468(n). - Omar E. Pol, Oct 21 2011
MATHEMATICA
t=Flatten[Position[Table[PrimeQ[w], {w, 2, 256}], False]]+1 Delete[t-RotateRight[t], 1]
Differences[Select[Range[0, 200], !PrimeQ[#]&]] (* Harvey P. Dale, May 27 2018 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
G. L. Honaker, Jr., Apr 09 2000
EXTENSIONS
More terms from James A. Sellers, Apr 11 2000
STATUS
approved