login
A030424
(# 1's)-(# 2's) in first n terms of A030413.
0
1, 0, 0, 1, 2, 1, 1, 1, 2, 3, 4, 5, 4, 4, 3, 3, 4, 4, 5, 6, 5, 6, 5, 6, 6, 6, 6, 5, 4, 5, 6, 7, 7, 6, 7, 6, 7, 6, 6, 5, 5, 5, 6, 5, 5, 6, 5, 5, 5, 5, 6, 5, 4, 4, 5, 4, 4, 5, 5, 5, 6, 7, 8, 9, 10, 9, 8, 9, 8, 8, 9, 8, 7, 6, 6, 6, 6, 5, 6, 6, 7, 8, 8, 7, 7, 7, 8, 7, 7, 7
OFFSET
1,5
MATHEMATICA
Accumulate[Which[#==1, 1, #==2, -1, True, 0]&/@Rest[Flatten[IntegerDigits[ #, 4]&/@ Fibonacci[Range[30]]]]] (* Harvey P. Dale, Apr 04 2013 *)
CROSSREFS
Sequence in context: A129176 A134132 A308121 * A216656 A353435 A295679
KEYWORD
nonn
STATUS
approved