cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A020909 Number of bits in the base-2 representation of the n-th Fibonacci number.

This page as a plain text file.
%I A020909 #29 Jul 02 2025 16:01:55
%S A020909 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 A020909 19,19,20,21,22,22,23,24,24,25,26,26,27,28,28,29,30,31,31,32,33,33,34,
%U A020909 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 A020909 Number of bits in the base-2 representation of the n-th Fibonacci number.
%F A020909 a(n) = 1 + floor( log_2( A000045(n) ) ).
%F A020909 a(n) = A070939(A000045(n)). - _R. J. Mathar_, Aug 11 2012
%t A020909 f[n_] := 1 + Floor@ Log2@ Fibonacci@ n; Array[f, 74] (* _Robert G. Wilson v_, Jun 24 2011 *)
%t A020909 IntegerLength[#,2]&/@Fibonacci[Range[80]] (* _Harvey P. Dale_, Feb 11 2015 *)
%o A020909 (PARI) a(n)={
%o A020909   if(n<99,return(#binary(fibonacci(n))));
%o A020909   localbitprec(logint(n*6351109\9148265,2)+64);
%o A020909   my(s=sqrt(5),phi=(s+1)/2,x=n*log(phi)-log(s));
%o A020909   ceil(x/log(2));
%o A020909 } \\ _Charles R Greathouse IV_, Aug 24 2021
%Y A020909 Cf. A000045, A070939.
%K A020909 nonn,easy,base
%O A020909 1,3
%A A020909 _Clark Kimberling_
%E A020909 More terms from _James Sellers_