login
Sum of indices of Fibonacci numbers in Zeckendorf representation of n, assuming the units place is Fibonacci(2).
1

%I #24 May 09 2021 11:17:43

%S 0,2,3,4,6,5,7,8,6,8,9,10,12,7,9,10,11,13,12,14,15,8,10,11,12,14,13,

%T 15,16,14,16,17,18,20,9,11,12,13,15,14,16,17,15,17,18,19,21,16,18,19,

%U 20,22,21,23,24,10,12,13,14,16,15,17,18,16,18,19,20,22,17,19,20

%N Sum of indices of Fibonacci numbers in Zeckendorf representation of n, assuming the units place is Fibonacci(2).

%C If n = F(i1) + F(i2) +...+ F(ik) is the Zeckendorf representation of n (i.e., write n in Fibonacci number system) then a(n) = i1 + i2 +...+ ik. 1 is Fibonacci(2). The variant with 1 = Fibonacci(1) is A227789.

%H Eric W. Weisstein, <a href="http://mathworld.wolfram.com/ZeckendorfRepresentation.html">Zeckendorf Representation</a>

%e a(33) = 20 because Zeckendorf representation of 33 is 21 + 8 + 3 + 1 = F(8) + F(6) + F(4) + F(2), thus a(33) = 8 + 6 + 4 + 2 = 20.

%o (Python)

%o A003714 = [n for n in range(1, 300) if 2*n & n == 0]

%o print(0, end=',')

%o for a in A003714:

%o sum = 0

%o i = 2

%o while a:

%o if a&1: sum += i

%o a >>= 1

%o i += 1

%o print(sum, end=',')

%Y Cf. A000045, A003714, A227789.

%K nonn,easy

%O 0,2

%A _Alex Ratushnyak_, Sep 23 2013