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”).

A030562
(# 1's)-(# 0's) in first n terms of A030548.
0
1, 1, 1, 1, 1, 2, 1, 2, 3, 4, 4, 5, 5, 6, 6, 7, 7, 7, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 7, 6, 7, 6, 7, 8, 7, 7, 8, 7, 7, 8, 7, 7, 8, 7, 7, 8, 9, 8, 9, 10, 11
OFFSET
1,6
MATHEMATICA
Accumulate[Which[#==1, 1, #==0, -1, True, 0]&/@Flatten[IntegerDigits[Range[50], 6]]] (* Harvey P. Dale, Jul 10 2023 *)
CROSSREFS
Sequence in context: A030339 A030383 A031231 * A238219 A026833 A281544
KEYWORD
nonn
STATUS
approved