%I #28 Aug 24 2021 17:18:20
%S 1,1,2,2,3,4,4,5,6,6,7,8,8,9,10,10,11,12,13,13,14,15,15,16,17,17,18,
%T 19,19,20,21,22,22,23,24,24,25,26,26,27,28,28,29,30,31,31,32,33,33,34,
%U 35,35,36,37,38,38,39,40,40,41,42,42,43,44,44,45,46,47,47,48,49,49,50,51
%N Number of bits in the base-2 representation of the n-th Fibonacci number.
%F a(n) = 1 + floor( log_2( A000045(n) ) ).
%F a(n) = A070939(A000045(n)). - _R. J. Mathar_, Aug 11 2012
%t f[n_] := 1 + Floor@ Log2@ Fibonacci@ n; Array[f, 74] (* _Robert G. Wilson v_, Jun 24 2011 *)
%t IntegerLength[#,2]&/@Fibonacci[Range[80]] (* _Harvey P. Dale_, Feb 11 2015 *)
%o (PARI) a(n)={
%o if(n<99,return(#binary(fibonacci(n))));
%o localbitprec(logint(n*6351109\9148265,2)+64);
%o my(s=sqrt(5),phi=(s+1)/2,x=n*log(phi)-log(s));
%o ceil(x/log(2));
%o } \\ _Charles R Greathouse IV_, Aug 24 2021
%Y Cf. A000045, A070939.
%K nonn,easy,base
%O 1,3
%A _Clark Kimberling_
%E More terms from _James A. Sellers_
|