login
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