A165277 Number of odd-indexed Fibonacci numbers in the Zeckendorf representation of n.
0, 1, 0, 0, 1, 1, 2, 0, 0, 1, 0, 0, 1, 1, 2, 1, 1, 2, 2, 3, 0, 0, 1, 0, 0, 1, 1, 2, 0, 0, 1, 0, 0, 1, 1, 2, 1, 1, 2, 2, 3, 1, 1, 2, 1, 1, 2, 2, 3, 2, 2, 3, 3, 4, 0, 0, 1, 0, 0, 1, 1, 2, 0, 0, 1, 0, 0, 1, 1, 2, 1, 1, 2, 2, 3, 0, 0, 1, 0, 0, 1, 1, 2, 0, 0, 1, 0, 0, 1, 1, 2, 1, 1, 2, 2, 3, 1, 1, 2, 1, 1, 2, 2, 3, 2
Offset: 1
Keywords
Examples
6 = 5 + 1 = F(5) + F(2), so that a(6) = 1.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
fibOddCount[n_] := Plus @@ (Reverse@IntegerDigits[n, 2])[[2 ;; -1 ;; 2]]; fibOddCount /@ Select[Range[1000], BitAnd[#, 2 #] == 0 &] (* Amiram Eldar, Jan 20 2020 *)
Comments