login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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