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.

A095791 Number of digits in lazy-Fibonacci-binary representation of n (A104326).

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9
Offset: 0

Views

Author

Clark Kimberling, Jun 05 2004

Keywords

Comments

The lazy Fibonacci representation of n >= 0 is obtained by replacing every string of 0's in the binary representation of n by a single 0, thus obtaining a finite zero-one sequence (d(2), d(3), d(4), ..., d(k)), and then forming d(2)*F(2) + d(3)*F(3) + ... + d(k)*F(k), as in the Mathematica program. The lazy Fibonacci representation is often called the maximal Fibonacci representation, in contrast to the Zeckendorf representation, also called the minimal Fibonacci representation. - Clark Kimberling, Mar 04 2015
Regarding the References, the lazy Fibonacci representation is sometimes attributed to Erdős and Joo, but it is also found in Brown and Ferns. - Clark Kimberling, Mar 04 2015

Examples

			The lazy Fibonacci representation of 14 is 8+3+2+1, which in binary notation is 10111, which consists of 5 digits.
		

Crossrefs

Programs

  • Mathematica
    t=DeleteCases[IntegerDigits[-1+Range[200],2],{_,0,0,_}];
    A181632=Flatten[t]
    A095791=Map[Length,t]
    A112309=Map[DeleteCases[Reverse[#] Fibonacci[Range[Length[#]]+1],0]&,t]
    A112310=Map[Length,A112309]
    (* Peter J. C. Moses, Mar 03 2015 *)
  • PARI
    a(n)=if(n<2,1,a(floor(n*(-1+sqrt(5))/2))+1) \\ Benoit Cloitre, Dec 17 2006
    
  • PARI
    a(n)=if(n<0,0,c=1;s=n;while(floor(s*2/(1+sqrt(5)))>0,c++;s=floor(s*2/(1+sqrt(5))));c) \\ Benoit Cloitre, May 24 2007

Formula

1, 1, then F(3) 2's, then F(4) 3's, then F(5) 4's, ..., then F(k+1) k's, ...
a(0)=a(1)=1 then a(n) = a(floor(n/tau))+1 where tau=(1+sqrt(5))/2. - Benoit Cloitre, Dec 17 2006
a(n) is the least k such that f^(k)(n)=0 where f^(k+1)(x)=f(f^(k)(x)) and f(x)=floor(x/phi) where phi=(1+sqrt(5))/2 (see PARI/GP program). - Benoit Cloitre, May 24 2007
a(n) = A070939(A104326(n)). - Amiram Eldar, Oct 10 2023