login
A227788
Sum of indices of Fibonacci numbers in Zeckendorf representation of n, assuming the units place is Fibonacci(2).
1
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, 15, 16, 14, 16, 17, 18, 20, 9, 11, 12, 13, 15, 14, 16, 17, 15, 17, 18, 19, 21, 16, 18, 19, 20, 22, 21, 23, 24, 10, 12, 13, 14, 16, 15, 17, 18, 16, 18, 19, 20, 22, 17, 19, 20
OFFSET
0,2
COMMENTS
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.
EXAMPLE
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.
PROG
(Python)
A003714 = [n for n in range(1, 300) if 2*n & n == 0]
print(0, end=', ')
for a in A003714:
sum = 0
i = 2
while a:
if a&1: sum += i
a >>= 1
i += 1
print(sum, end=', ')
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alex Ratushnyak, Sep 23 2013
STATUS
approved