login
A030601
a(n)=(# 1's)-(# 0's) in first n terms of A030588.
1
1, 1, 1, 2, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 9, 10, 11, 10, 10, 11, 10, 10, 11, 12, 13, 14, 15, 15, 16, 17, 17, 18, 18, 19, 20, 20, 20, 21, 21, 21, 22, 22, 23, 24, 24, 24, 25, 25, 25, 26, 26, 27
OFFSET
1,4
MATHEMATICA
Accumulate[Which[#==1, 1, #==0, -1, True, 0]&/@Flatten[Table[ IntegerDigits[ 2n-1, 6], {n, 50}]]] (* Harvey P. Dale, Jan 30 2015 *)
CROSSREFS
Sequence in context: A268383 A092338 A199769 * A049839 A130233 A131234
KEYWORD
nonn
STATUS
approved