A030371 a(n)=(# 1's)-(# 0's) in first n terms of A030363.
1, 1, 2, 1, 2, 2, 2, 2, 3, 4, 5, 5, 6, 5, 6, 5, 5, 6, 6, 5, 4, 5, 6, 5, 4, 4, 4, 5, 5, 6, 5, 4, 4, 4, 5, 5, 5, 6, 7, 8, 8, 8, 8, 8, 9, 10, 11, 11, 12, 13, 14, 13, 12, 13, 13, 12, 12, 11, 12, 12, 11, 12, 13, 14, 13, 14, 15, 15, 15, 14, 15, 16, 16, 16, 15
Offset: 1
Keywords
Programs
-
Mathematica
Accumulate[Flatten[IntegerDigits[Fibonacci[Range[2,30]],3]]/.{0->-1,2->0}] (* Harvey P. Dale, Jan 16 2020 *)