OFFSET
0,3
COMMENTS
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 0..10000
Ron Knott, About Fibonacci Number System
FORMULA
a(n) = interpret_as_zeckendorf_expansion(rewrite_0to0_1to01(n)) (where rewrite_0to0_1to01(n)=A048678[ n ])
MAPLE
rewrite_0to0_1to01 := proc(n) option remember; if(n < 2) then RETURN(n); else RETURN(((2^(1+(n mod 2))) * rewrite_0to0_1to01(floor(n/2))) + (n mod 2)); fi; end; interpret_as_zeckendorf_expansion := n -> sum('(bit_i(n, i)*fib(i+2))', 'i'=0..floor_log_2(n));
PROG
(PARI) a(n)=my(k=1, s); while(n, if(n%2, s+=fibonacci(k++)); k++; n>>=1); s \\ Charles R Greathouse IV, Nov 17 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Antti Karttunen, Jul 14 1999
STATUS
approved