%I #14 Jul 01 2019 02:02:52
%S 1,2,2,3,3,3,3,5,5,5,5,5,5,5,5,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,13,13,
%T 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,
%U 13,13,13,13,13,13,13,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21
%N Numerator of g(n) defined by g(1)=1, g(2n)=1/g(n)+1, g(2n+1)=g(2n).
%F a(n) = A000045(ceiling(log(n+1)/log(2))+1).
%F a(1)=1 then a(n) = a(floor(n/2)) + a(floor(n/4)). - _Benoit Cloitre_, Feb 03 2014
%o (PARI) g(n)=if(n<2,1,if(n%2,g(n-1),1/g(n/2)+1)) //then// a(n)=numerator(g(n)) //or// a(n)=fibonacci(ceil(log(n+1)/log(2))+1)
%o (PARI) a(n)=if(n<2,1,a(n\2)+a(n\4))
%Y Cf. A020650, A124230.
%K frac,nonn
%O 0,2
%A _Benoit Cloitre_, Oct 20 2006
|