OFFSET
2,2
COMMENTS
FORMULA
If the Zeckendorf representation of M ends with exactly k zeros, ...10^k, then a(n) = ceiling(2^k/3).
MAPLE
with(combinat): F:=fibonacci:
A130234 := proc(n)
local i;
for i from 0 do
if F(i) >= n then
return i;
end if;
end do:
end proc:
A014417 := proc(n)
local nshi, Z, i ;
if n <= 1 then
return n;
end if;
nshi := n ;
Z := [] ;
for i from A130234(n) to 2 by -1 do
if nshi >= F(i) and nshi > 0 then
Z := [1, op(Z)] ;
nshi := nshi-F(i) ;
else
Z := [0, op(Z)] ;
end if;
end do:
add( op(i, Z)*10^(i-1), i=1..nops(Z)) ;
end proc:
A072649:= proc(n) local j; global F; for j from ilog[(1+sqrt(5))/2](n)
while F(j+1)<=n do od; (j-1); end proc:
A003714 := proc(n) global F; option remember; if(n < 3) then RETURN(n); else RETURN((2^(A072649(n)-1))+A003714(n-F(1+A072649(n)))); fi; end proc:
a:=[];
for n from 1 to 120 do
od;
a;
CROSSREFS
KEYWORD
nonn
AUTHOR
Jeffrey Shallit and N. J. A. Sloane, Oct 03 2018
STATUS
approved