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.

Showing 1-10 of 15 results. Next

A095792 a(n) = Z(n) - L(n), where Z=A072649 and L=A095791 are lengths of Zeckendorf and lazy Fibonacci representations in binary notation.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Clark Kimberling, Jun 05 2004

Keywords

Examples

			Zeckendorf-binary of 11 is 10100; lazy-Fibonacci-binary of 11 is 1111.
Thus Z(11)=5, L(11)=4 and a(11)=5-4=1.
		

Crossrefs

Programs

  • Mathematica
    t1 = DeleteCases[IntegerDigits[-1 + Range[5001], 2], {_, 0, 0, _}]; (* maximal, lazy *)
    t2 = DeleteCases[IntegerDigits[-1 + Range[5001], 2], {_, 1, 1, _}];  (* minimal, Zeckendorf *)
    m = Map[Length, t2] - Take[Map[Length, t1], Length[t2]] (* A095792 *)
    (* Peter J. C. Moses, Mar 03 2015 *)

Formula

a(n)=0 if n is of the form F(k)-1 for k>=1 and a(n)=1 otherwise.

A000201 Lower Wythoff sequence (a Beatty sequence): a(n) = floor(n*phi), where phi = (1+sqrt(5))/2 = A001622.

Original entry on oeis.org

1, 3, 4, 6, 8, 9, 11, 12, 14, 16, 17, 19, 21, 22, 24, 25, 27, 29, 30, 32, 33, 35, 37, 38, 40, 42, 43, 45, 46, 48, 50, 51, 53, 55, 56, 58, 59, 61, 63, 64, 66, 67, 69, 71, 72, 74, 76, 77, 79, 80, 82, 84, 85, 87, 88, 90, 92, 93, 95, 97, 98, 100, 101, 103, 105, 106, 108, 110
Offset: 1

Views

Author

Keywords

Comments

This is the unique sequence a satisfying a'(n)=a(a(n))+1 for all n in the set N of natural numbers, where a' denotes the ordered complement (in N) of a. - Clark Kimberling, Feb 17 2003
This sequence and A001950 may be defined as follows. Consider the maps a -> ab, b -> a, starting from a(1) = a; then A000201 gives the indices of a, A001950 gives the indices of b. The sequence of letters in the infinite word begins a, b, a, a, b, a, b, a, a, b, a, ... Setting a = 0, b = 1 gives A003849 (offset 0); setting a = 1, b = 0 gives A005614 (offset 0). - Philippe Deléham, Feb 20 2004
These are the numbers whose lazy Fibonacci representation (see A095791) includes 1; the complementary sequence (the upper Wythoff sequence, A001950) are the numbers whose lazy Fibonacci representation includes 2 but not 1.
a(n) is the unique monotonic sequence satisfying a(1)=1 and the condition "if n is in the sequence then n+(rank of n) is not in the sequence" (e.g. a(4)=6 so 6+4=10 and 10 is not in the sequence) - Benoit Cloitre, Mar 31 2006
Write A for A000201 and B for A001950 (the upper Wythoff sequence, complement of A). Then the composite sequences AA, AB, BA, BB, AAA, AAB,...,BBB,... appear in many complementary equations having solution A000201 (or equivalently, A001950). Typical complementary equations: AB=A+B (=A003623), BB=A+2B (=A101864), BBB=3A+5B (=A134864). - Clark Kimberling, Nov 14 2007
Cumulative sum of A001468 terms. - Eric Angelini, Aug 19 2008
The lower Wythoff sequence also can be constructed by playing the so-called Mancala-game: n piles of total d(n) chips are standing in a row. The piles are numbered from left to right by 1, 2, 3, ... . The number of chips in a pile at the beginning of the game is equal to the number of the pile. One step of the game is described as follows: Distribute the pile on the very left one by one to the piles right of it. If chips are remaining, build piles out of one chip subsequently to the right. After f(n) steps the game ends in a constant row of piles. The lower Wythoff sequence is also given by n -> f(n). - Roland Schroeder (florola(AT)gmx.de), Jun 19 2010
With the exception of the first term, a(n) gives the number of iterations required to reverse the list {1,2,3,...,n} when using the mapping defined as follows: remove the first term of the list, z(1), and add 1 to each of the next z(1) terms (appending 1's if necessary) to get a new list. See A183110 where this mapping is used and other references given. This appears to be essentially the Mancala-type game interpretation given by R. Schroeder above. - John W. Layman, Feb 03 2011
Also row numbers of A213676 starting with an even number of zeros. - Reinhard Zumkeller, Mar 10 2013
From Jianing Song, Aug 18 2022: (Start)
Numbers k such that {k*phi} > phi^(-2), where {} denotes the fractional part.
Proof: Write m = floor(k*phi).
If {k*phi} > phi^(-2), take s = m-k+1. From m < k*phi < m+1 we have k < (m-k+1)*phi < k + phi, so floor(s*phi) = k or k+1. If floor(s*phi) = k+1, then (see A003622) floor((k+1)*phi) = floor(floor(s*phi)*phi) = floor(s*phi^2)-1 = s+floor(s*phi)-1 = m+1, but actually we have (k+1)*phi > m+phi+phi^(-2) = m+2, a contradiction. Hence floor(s*phi) = k.
If floor(s*phi) = k, suppose otherwise that k*phi - m <= phi^(-2), then m < (k+1)*phi <= m+2, so floor((k+1)*phi) = m+1. Suppose that A035513(p,q) = k for p,q >= 1, then A035513(p,q+1) = floor((k+1)*phi) - 1 = m = A035513(s,1). But it is impossible for one number (m) to occur twice in A035513. (End)
The formula from Jianing Song above is a direct consequence of an old result by Carlitz et al. (1972). Their Theorem 11 states that (a(n)) consists of the numbers k such that {k*phi^(-2)} < phi^(-1). One has {k*phi^(-2)} = {k*(2-phi)} = {-k*phi}. Using that 1-phi^(-1) = phi^(-2), the Jianing Song formula follows. - Michel Dekking, Oct 14 2023
In the Fokkink-Joshi paper, this sequence is the Cloitre (1,1,2,1)-hiccup sequence, i.e., a(1) = 1; for m < n, a(n) = a(n-1)+2 if a(m) = n-1, else a(n) = a(n-1)+1. - Michael De Vlieger, Jul 28 2025

Examples

			From Roland Schroeder (florola(AT)gmx.de), Jul 13 2010: (Start)
Example for n = 5; a(5) = 8;
(Start: [1,2,3,4,5]; 8 steps until [5,4,3,2,1]):
[1,2,3,4,5]; [3,3,4,5]; [4,5,6]; [6,7,1,1]; [8,2,2,1,1,1]: [3,3,2,2,2,1,1,1]; [4,3,3,2,1,1,1]; [4,4,3,2,1,1]; [5,4,3,2,1]. (End)
		

References

  • Eric Friedman, Scott M. Garrabrant, Ilona K. Phipps-Morgan, A. S. Landsberg and Urban Larsson, Geometric analysis of a generalized Wythoff game, in Games of no Chance 5, MSRI publ. Cambridge University Press, date?
  • M. Gardner, Penrose Tiles to Trapdoor Ciphers, W. H. Freeman, 1989; see p. 107.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • I. M. Yaglom, Two games with matchsticks, pp. 1-7 of Qvant Selecta: Combinatorics I, Amer Math. Soc., 2001.

Crossrefs

a(n) = least k such that s(k) = n, where s = A026242. Complement of A001950. See also A058066.
The permutation A002251 maps between this sequence and A001950, in that A002251(a(n)) = A001950(n), A002251(A001950(n)) = a(n).
First differences give A014675. a(n) = A022342(n) + 1 = A005206(n) + n + 1. a(2n)-a(n)=A007067(n). a(a(a(n)))-a(n) = A026274(n-1). - Benoit Cloitre, Mar 08 2003
A185615 gives values n such that n divides A000201(n)^m for some integer m>0.
Let A = A000201, B = A001950. Then AA = A003622, AB = A003623, BA = A035336, BB = A101864.
The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A000201 as the parent: A000201, A001030, A001468, A001950, A003622, A003842, A003849, A004641, A005614, A014675, A022342, A088462, A096270, A114986, A124841. - N. J. A. Sloane, Mar 11 2021
Bisections: A276854, A342279.

Programs

  • Haskell
    a000201 n = a000201_list !! (n-1)
    a000201_list = f [1..] [1..] where
       f (x:xs) (y:ys) = y : f xs (delete (x + y) ys)
    -- Reinhard Zumkeller, Jul 02 2015, Mar 10 2013
    
  • Maple
    Digits := 100; t := evalf((1+sqrt(5))/2); A000201 := n->floor(t*n);
  • Mathematica
    Table[Floor[N[n*(1+Sqrt[5])/2]], {n, 1, 75}]
    Array[ Floor[ #*GoldenRatio] &, 68] (* Robert G. Wilson v, Apr 17 2010 *)
  • Maxima
    makelist(floor(n*(1+sqrt(5))/2),n,1,60); /* Martin Ettl, Oct 17 2012 */
    
  • PARI
    a(n)=floor(n*(sqrt(5)+1)/2)
    
  • PARI
    a(n)=(n+sqrtint(5*n^2))\2 \\ Charles R Greathouse IV, Feb 07 2013
    
  • Python
    def aupton(terms):
      alst, aset = [None, 1], {1}
      for n in range(1, terms):
        an = alst[n] + (1 if n not in aset else 2)
        alst.append(an); aset.add(an)
      return alst[1:]
    print(aupton(68)) # Michael S. Branicky, May 14 2021
    
  • Python
    from math import isqrt
    def A000201(n): return (n+isqrt(5*n**2))//2 # Chai Wah Wu, Jan 11 2022

Formula

Zeckendorf expansion of n (cf. A035517) ends with an even number of 0's.
Other properties: a(1)=1; for n>1, a(n) is taken to be the smallest integer greater than a(n-1) which is consistent with the condition "n is in the sequence if and only if a(n)+1 is not in the sequence".
a(1) = 1; for n>0, a(n+1) = a(n)+1 if n is not in the sequence, a(n+1) = a(n)+2 if n is in the sequence.
a(a(n)) = floor(n*phi^2) - 1 = A003622(n).
{a(k)} union {a(k)+1} = {1, 2, 3, 4, ...}. Hence a(1) = 1; for n>1, a(a(n)) = a(a(n)-1)+2, a(a(n)+1) = a(a(n))+1. - Benoit Cloitre, Mar 08 2003
{a(n)} is a solution to the recurrence a(a(n)+n) = 2*a(n)+n, a(1)=1 (see Barbeau et al.).
a(n) = A001950(n) - n. - Philippe Deléham, May 02 2004
a(0) = 0; a(n) = n + Max_{k : a(k) < n}. - Vladeta Jovovic, Jun 11 2004
a(Fibonacci(r-1)+j) = Fibonacci(r)+a(j) for 0 < j <= Fibonacci(r-2); 2 < r. - Paul Weisenhorn, Aug 18 2012
With 1 < k and A001950(k-1) < n <= A001950(k): a(n) = 2*n-k; A001950(n) = 3*n-k. - Paul Weisenhorn, Aug 21 2012

A072649 n occurs Fibonacci(n) times (cf. A000045).

Original entry on oeis.org

1, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 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, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10
Offset: 1

Views

Author

Antti Karttunen, Jun 02 2002

Keywords

Comments

Number of digits in Zeckendorf-binary representation of n. E.g., the Zeckendorf representation of 12 is 8+3+1, which in binary notation is 10101, which consists of 5 digits. - Clark Kimberling, Jun 05 2004
First position where value n occurs is A000045(n+1), i.e., a(A000045(n)) = n-1, for n >= 2 and a(A000045(n)-1) = n-2, for n >= 3.
This is the number of distinct Fibonacci numbers greater than 0 which are less than or equal to n. - Robert G. Wilson v, Dec 10 2006
The smallest nondecreasing sequence a(n) such that a(Fibonacci(n-1)) = n. - Tanya Khovanova, Jun 20 2007

Examples

			1, 1, then F(2) 2's, then F(3) 3's, then F(4) 4's, ..., then F(k) k's, ...
		

Crossrefs

Cf. A001622 (golden ratio phi), A073010.
Used to construct A003714. Cf. also A002024, A072643, A072648, A072650.
Cf. A131234.
Partial sums: A256966, A256967.

Programs

  • Haskell
    a072649 n = a072649_list !! (n-1)
    a072649_list = f 1 where
       f n = (replicate (fromInteger $ a000045 n) n) ++ f (n+1)
    -- Reinhard Zumkeller, Jul 04 2011
    
  • Maple
    A072649 := proc(n)
        local j;
        for j from ilog[(1+sqrt(5))/2](n) while combinat[fibonacci](j+1)<=n do
        end do;
        j-1
    end proc:
    seq(A072649(n), n=1..120);  # Alois P. Heinz, Mar 18 2013
  • Mathematica
    Table[Table[n, {Fibonacci[n]}], {n, 10}] // Flatten (* Robert G. Wilson v, Jan 14 2007 *)
    a[n_] := Module[{j}, For[j = Floor@Log[GoldenRatio, n], Fibonacci[j+1] <= n, j++]; j-1];
    Table[a[n], {n, 1, 120}] (* Jean-François Alcover, Nov 17 2022, after Alois P. Heinz *)
  • PARI
    a(n) = -1+floor(log(((n+0.2)*sqrt(5)))/log((1+sqrt(5))/2))
    
  • PARI
    a(n)=local(m); if(n<1,0,m=0; until(fibonacci(m)>n,m++); m-2)
    
  • Python
    from sympy import fibonacci
    def a(n):
        if n<1: return 0
        m=0
        while fibonacci(m)<=n: m+=1
        return m-2
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 09 2017
    
  • Python
    def A072649(n):
        a, b, c = 0, 1, -2
        while a <= n:
            a, b = b, a+b
            c += 1
        return c # Chai Wah Wu, Nov 04 2024
    (MIT/GNU Scheme) (define (A072649 n) (let ((b (A072648 n))) (+ -1 b (floor->exact (/ n (A000045 (1+ b))))))) ;; (The implementation below is better)
    
  • Scheme
    (define (A072649 n) (if (<= n 3) n (let loop ((k 5)) (if (> (A000045 k) n) (- k 2) (loop (+ 1 k)))))) ;; (Use this with the memoized implementation of A000045 given under that entry. No floating point arithmetic is involved). - Antti Karttunen, Oct 06 2017

Formula

G.f.: (Sum_{n>1} x^Fibonacci(n))/(1-x). - Michael Somos, Apr 25 2003
From Hieronymus Fischer, May 02 2007: (Start)
a(n) = floor(log_phi((sqrt(5)*n + sqrt(5*n^2+4))/2)) - 1, where phi is A001622.
a(n) = floor(arcsinh(sqrt(5)*n/2)/log(phi)) - 1.
a(n) = A108852(n) - 2. (End)
a(n) = -1 + floor( log_phi( (n+0.2)*sqrt(5) ) ), where log_phi(x) is the logarithm to the base (1+sqrt(5))/2. - Ralf Stephan, May 14 2007
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(3*sqrt(3)) (A073010). - Amiram Eldar, Feb 18 2024

Extensions

Typo fixed by Charles R Greathouse IV, Oct 28 2009

A104326 Dual Zeckendorf representation of n or the maximal (binary) Fibonacci representation. Also list of binary vectors not containing 00.

Original entry on oeis.org

0, 1, 10, 11, 101, 110, 111, 1010, 1011, 1101, 1110, 1111, 10101, 10110, 10111, 11010, 11011, 11101, 11110, 11111, 101010, 101011, 101101, 101110, 101111, 110101, 110110, 110111, 111010, 111011, 111101, 111110, 111111, 1010101
Offset: 0

Views

Author

Ron Knott, Mar 01 2005

Keywords

Comments

Whereas the Zeckendorf (binary) rep (A014417) has no consecutive 1's (no two consecutive Fibonacci numbers in a set whose sum is n), the Dual Zeckendorf Representation has no consecutive 0's. Also called the Maximal (Binary) Fibonacci Representation, the Zeckendorf rep. being the Minimal in terms of number of 1's in the binary representation.
Also known as the lazy Fibonacci representation of n. - Glen Whitney, Oct 21 2017

Examples

			As a sum of Fibonacci numbers (A000045) [using 1 at most once], 13 is 13=8+5=8+3+2.
The largest set here is 8+3+2 or, in base Fibonacci, 10110 so a(13)=10110(fib).
The Zeckendorf representation would be the smallest set or {13}=100000(fib).
		

Crossrefs

Cf. A007088 (binary vectors), A014417, A095791, A104324.
A003754 gives the numbers corresponding to the binary digit strings seen here.

Programs

  • Maple
    dualzeckrep:=proc(n)local i,z;z:=zeckrep(n);i:=1; while i<=nops(z)-2 do if z[i]=1 and z[i+1]=0 and z[i+2]=0 then z[i]:=0; z[i+1]:=1;z[i+2]:=1; if i>3 then i:=i-2 fi else i:=i+1 fi od; if z[1]=0 then z:=subsop(1=NULL,z) fi; z end proc: seq(dualzeckrep(n),n=0..20) ;
    # alternative
    A104326 := proc(n)
        local L,itr,rec,i ;
        # first compute the usual Zeckendorf rep as in A014417
        L := convert(A014417(n),base,10) ;
        for itr from 1 do
            rec := false ;
            # try to recombine 001 -> 110
            for i from 3 to nops(L) do
                if op(i,L) = 1 and op(i-1,L) =0 and op(i-2,L) =0 then
                    rec := true ;
                    L := subsop(i=0,L) ;
                    L := subsop(i-1=1,L) ;
                    L := subsop(i-2=1,L) ;
                end if;
            end do:
            if op(-1,L) = 0 then
                L := subsop(-1=NULL,L) ;
            end if;
            if rec = false then
                break ;
            end if;
        end do:
        add( op(i,L)*10^(i-1),i=1..nops(L)) ;
    end proc:
    seq(A104326(n),n=0..20) ; # R. J. Mathar, Aug 28 2025
  • Mathematica
    fb[n_] := Module[{k = Ceiling[Log[GoldenRatio, n*Sqrt[5]]], t = n, fr = {}}, While[k > 1, If[t >= Fibonacci[k], AppendTo[fr, 1]; t = t - Fibonacci[k], AppendTo[fr, 0]]; k--]; fr]; a[n_] := Module[{v = fb[n]}, nv = Length[v]; i = 1; While[i <= nv - 2, If[v[[i]] == 1 && v[[i + 1]] == 0 && v[[i + 2]] == 0, v[[i]] = 0; v[[i + 1]] = 1; v[[i + 2]] = 1; If[i > 2, i -= 3]]; i++]; i = Position[v, ?(# > 0 &)]; If[i == {}, 0, FromDigits[v[[i[[1, 1]] ;; -1]]]]]; Array[a, 34, 0] (* _Amiram Eldar, Oct 31 2019 after Robert G. Wilson v at A014417 and the Maple code *)
    Map[FromDigits, Select[IntegerString[Range[0, 255], 2], StringFreeQ[#, "00"] &]] (* Paolo Xausa, Apr 05 2024 *)

Formula

a(n) = A007088(A003754(n+1)).

Extensions

Index in formula corrected, missing parts of the maple code recovered, and sequence extended by R. J. Mathar, Oct 23 2010
Definition expanded and Duchêne, Fraenkel et al. reference added by N. J. A. Sloane, Aug 07 2018

A026352 a(n) = floor(n*tau) + n + 1 where tau is the golden ratio A001622.

Original entry on oeis.org

1, 3, 6, 8, 11, 14, 16, 19, 21, 24, 27, 29, 32, 35, 37, 40, 42, 45, 48, 50, 53, 55, 58, 61, 63, 66, 69, 71, 74, 76, 79, 82, 84, 87, 90, 92, 95, 97, 100, 103, 105, 108, 110, 113, 116, 118, 121, 124, 126, 129, 131, 134, 137, 139, 142, 144
Offset: 0

Views

Author

Clark Kimberling, Dec 11 1999

Keywords

Comments

a(n) = greatest k such that s(k) = n+1, where s = A026350.
Indices at which blocks (0;1) occur in infinite Fibonacci word; i.e., n such that A005614(n)=0 and A005614(n+1)=1. - Benoit Cloitre, Nov 15 2003
Except for the first term, these are the numbers whose lazy Fibonacci representation (see A095791) includes both 1 and 2; thus this sequence is a subsequence of the lower Wythoff sequence, A000201. - Clark Kimberling, Jun 10 2004 [A-number typo corrected by Nathan Fox, May 03 2014]
a(n) = n-th number k whose lazy Fibonacci representation (as in A095791) has more summands than that of k-1. - Clark Kimberling, Jun 12 2004
a(n) = position of n-th 0 in A096270. - Clark Kimberling, Apr 22 2011
Maximum number of chips in a pile created at each step in the game described by Roland Schroeder in his comment at A000201. (From Allan C. Wechsler via Seqfan.)
In the Fokkink-Joshi paper, this sequence is the Cloitre (1,1,2,3)-hiccup sequence, i.e., a(1) = 1; for m < n, a(n) = a(n-1)+2 if a(m) = n-1, else a(n) = a(n-1)+3. - Michael De Vlieger, Jul 28 2025

Crossrefs

Essentially same as A004957.
Subsequence of A000201.
Complement of A026351.

Programs

Formula

a(n) = A026351(n)+n. - R. J. Mathar, Jun 24 2025

A226207 Table by antidiagonals: D(m,n) = Zeckendorf distance between m and n.

Original entry on oeis.org

0, 1, 1, 2, 0, 2, 2, 1, 1, 2, 3, 1, 0, 1, 3, 3, 2, 2, 2, 2, 3, 3, 2, 1, 0, 1, 2, 3, 4, 2, 1, 3, 3, 1, 2, 4, 4, 3, 3, 3, 0, 3, 3, 3, 4, 4, 3, 2, 1, 2, 2, 1, 2, 3, 4, 4, 3, 2, 4, 4, 0, 4, 4, 2, 3, 4, 4, 3, 2, 4, 1, 4, 4, 1, 4, 2, 3, 4, 5, 3, 4, 4, 1, 3, 0, 3
Offset: 1

Views

Author

Clark Kimberling, May 31 2013

Keywords

Comments

The Zeckendorf distance between positive integers m and n is defined as follows. Suppose that n = F(i1) + F(i2) + ... F(ij) is the Zeckendorf representation of n, where 1 is represented as F(1), not F(2). Let d(n) = F(i1 - 1) + F(i2 - 1) + ... + F(ij - 1); i.e., the indexes for n are downshifted to form d(n). Starting with any n, the number of arrows in the graph n -> d(n) -> d(d(n)) -> ... -> 1 is the "generation number" of n; write the k-th node as s(k,n). If m and n are positive integers, let K(m) and K(n) be the numbers for which s(K(m),m) = s(K(n),n). This first common ancestor, or root, of m and n is denoted r(m,n). The distance between m and n is D(m,n) = K(m) + K(n).
It is helpful to regard m and n as nodes in a "Zeckendorf tree" rooted a 1 with edges given by successive upshifting of indexes of Zeckendorf representations; then D(m,n) is the number of edges from m to n. Equivalently, one can start with the Fibonacci (or rabbit) tree of the positive rational numbers (A226080). Replacing each fraction in the tree by its position when the elements are arranged in the order in which generated gives the Zeckendorf array. Thus, D is not only the Zeckendorf graph metric for positive integers, but is also, isomorphically speaking, a graph metric for the positive rational numbers.
Suppose that b(n) and c(n) are sequences of positive integers. Sequences D(b(n),c(n)), with exceptions for first terms in some cases, are indicated here:
....
D(b(n),c(n)) ... b(n) ........ c(n)
A000012 ........ F(n) ........ F(n+1), consecutive Fibonacci numbers
A005408 ........ F(n) ........ L(n), Fibonacci(n) and Lucas(n)
A095791 ........ 1 ........... n
A000012 ........ A000201(n) .. A001950(n), the Wythoff sequences
A226208 ........ n ........... n+1
A226209 ........ n ........... n+2
A226210 ........ n............ F(n)
A226211 ........ n............ 2n
A226212 ........ n............ floor(n/2)
A226213 ........ n............ 2^n
A226214 ........ n............ n^2
A226215 ........ n! .......... (n+1)!

Examples

			Northwest corner of the distance table, D(m,n), m>=1, n>=1:
0 1 2 2 3 3 3 4 4 4 4 4 4
1 0 1 1 2 2 2 3 3 3 3 3 4
2 1 0 2 1 1 3 2 2 2 4 4 3
2 1 2 0 3 3 1 4 4 4 2 2 5
3 2 1 3 0 2 4 1 1 3 5 5 2
3 2 3 1 4 4 0 5 5 5 1 1 6
4 3 2 4 1 3 5 0 2 4 6 6 1
4 3 2 4 1 3 5 2 0 4 6 6 3
4 3 2 4 3 1 5 4 4 0 6 6 5
4 3 4 2 5 5 1 6 6 6 0 2 7
4 3 4 2 5 5 1 6 6 6 2 0 7
5 4 3 5 2 4 6 1 3 5 7 7 0
The distance from 36 to 26 is found here, showing successive downsteps:
36 = 34 + 8 + 3 + 1 -> 21 + 5 + 2 -> 13 + 3 + 1 -> 8 + 2
26 = 21 + 5 -> 13 + 3 -> 8 + 2
Thus, D(36,26) = 3 + 2 = 5; i.e. the root of 36 and 26, is 10; it takes 3 downshifts to get from 36 to 10 and 2 downshifts from 26 to 10, hence 5 edges in the Zeckendorf graph metric to get from 36 to 26.
		

Crossrefs

Programs

  • Mathematica
    zeck[n_Integer] := Block[{k = Ceiling[Log[GoldenRatio, n*Sqrt[5]]], t = n, z = {}}, While[k > 1, If[t >= Fibonacci[k], AppendTo[z, 1]; t = t - Fibonacci[k],  AppendTo[z, 0]]; k--]; If[n > 0 && z[[1]] == 0, Rest[z], z]]; d[n1_, n2_] := Module[{z1 = zeck[n1], z2 = zeck[n2]}, Length[z1] + Length[z2] - 2 (NestWhile[# + 1 &, 1, z1[[#]] == z2[[#]] &, 1,         Min[{Length[z1], Length[z2]}]] - 1)]; Table[d[m, n], {m, 1, 20}, {n, 1, 20}] // TableForm (* A226207 array *)
    Flatten[Table[d[k, n + 1 - k], {n, 1, 12}, {k, 1, n}]]  (* A226207 sequence *) (* Peter J. C. Moses, May 30 2013 *)

A331083 The number of terms in the negaFibonacci representation of n (A215022).

Original entry on oeis.org

1, 1, 2, 2, 1, 2, 2, 3, 3, 2, 3, 2, 1, 2, 2, 3, 3, 2, 3, 3, 4, 4, 3, 4, 3, 2, 3, 3, 4, 3, 2, 3, 2, 1, 2, 2, 3, 3, 2, 3, 3, 4, 4, 3, 4, 3, 2, 3, 3, 4, 4, 3, 4, 4, 5, 5, 4, 5, 4, 3, 4, 4, 5, 4, 3, 4, 3, 2, 3, 3, 4, 4, 3, 4, 4, 5, 4, 3, 4, 3, 2, 3, 3, 4, 3, 2, 3
Offset: 1

Views

Author

Amiram Eldar, Jan 08 2020

Keywords

Comments

The Fibonacci numbers F(2*n) are the indices of records of this sequence.

Examples

			The negaFibonacci representation of 3 is A215022(3) = 101, thus a(3) = 1 + 0 + 1 = 2.
		

Crossrefs

Programs

  • Mathematica
    ind[n_] := Floor[Log[Abs[n]*Sqrt[5] + 1/2]/Log[GoldenRatio]]; f[1] = 1; f[n_] := If[n > 0, i = ind[n - 1]; If[EvenQ[i], i++]; i, i = ind[-n]; If[OddQ[i], i++]; i]; a[n_] := Module[{k = n, s = 0}, While[k != 0, i = f[k]; s += 1; k -= Fibonacci[-i]]; s]; Array[a, 100]

Formula

a(A000045(2*n - 1)) = 1.
a(A000045(2*n)) = n.

A095903 Lexical ordering of the lazy Fibonacci representations.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 6, 8, 9, 12, 10, 13, 15, 20, 11, 14, 16, 21, 17, 22, 25, 33, 18, 23, 26, 34, 28, 36, 41, 54, 19, 24, 27, 35, 29, 37, 42, 55, 30, 38, 43, 56, 46, 59, 67, 88, 31, 39, 44, 57, 47, 60, 68, 89, 49, 62, 70, 91, 75, 96, 109, 143, 32, 40, 45, 58, 48, 61, 69, 90, 50, 63
Offset: 1

Views

Author

Clark Kimberling, Jun 12 2004

Keywords

Comments

A permutation of the natural numbers. As suggested by the example, the numbers can be generated as a graph consisting of two components, each being a tree. One tree has root 1 and consists of the numbers in the lower Wythoff sequence, A000201; the other has root 2 and consists of the numbers in the upper Wythoff sequence, A001950. (One could start with 0 and have a single tree instead of two components.)
Regard generations g(n) of the graph as rows of an array (see Example); then |g(n)| = 2^n. Every row includes exactly two Fibonacci numbers; specifically, row n includes F(2n) and F(2n+1). - Clark Kimberling, Mar 11 2015

Examples

			Start with 1,2. Suffix the next two Fibonacci numbers, getting 1+2, 1+3; 2+3, 2+5. Suffix the next two Fibonacci numbers, getting 1+2+3, 1+2+5, 1+3+5, 1+3+8; 2+3+5, 2+3+8, 2+5+8, 2+5+13. Continue, obtaining
row 1:  1,2
row 2:  3,4,5,7
row 3:  6,8,9,12,10,13,15,20
row 4:  11,14,16,21,17,22,25,33,18,23,26,34,28,36,41,54
		

Crossrefs

Cf. A000045, A095791, A000201, A001950, A255773 (the 1-tree), A255774 (the 2-tree).

Programs

  • Mathematica
    Map[Total,Fibonacci[Flatten[NestList[Flatten[Map[{Join[#,{Last[#]+1}],Join[#,{Last[#]+2}]}&,#],1]&,{{2},{3}},7],1]]]  (* Peter J. C. Moses, Mar 06 2015 *)
  • PARI
    a(n) = n++; my(x=0,y=0); for(i=0,logint(n,2)-1, y++;[x,y]=[y,x+y]; if(bittest(n,i), [x,y]=[y,x+y])); y; \\ Kevin Ryde, Jun 19 2021

A375430 The maximum exponent in the unique factorization of n in terms of distinct terms of A115975 using the dual Zeckendorf representation of the exponents in the prime factorization of n; a(1) = 0.

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 3, 1, 2, 1, 2, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 3, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 3, 3, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 3, 1, 2, 2, 2, 1, 1, 1, 2, 1
Offset: 1

Views

Author

Amiram Eldar, Aug 15 2024

Keywords

Comments

First differs from A299090 at n = 128. Differs from A046951 and A159631 at n = 1, 36, 64, 72, ... .
When the exponents in the prime factorization of n are expanded as sums of distinct Fibonacci numbers using the dual Zeckendorf representation (A104326), we get a unique factorization of n in terms of distinct terms of A115975, i.e., n is represented as a product of prime powers (A246655) whose exponents are Fibonacci numbers. a(n) is the maximum exponent of these prime powers. Thus all the terms are Fibonacci numbers.

Examples

			For n = 8 = 2^3, the dual Zeckendorf representation of 3 is 11, i.e., 3 = Fibonacci(2) + Fibonacci(3) = 1 + 2. Therefore 8 = 2^(1+2) = 2^1 * 2^2, and a(8) = 2.
		

Crossrefs

Programs

  • Mathematica
    A130312[n_] := Module[{k = 0}, While[Fibonacci[k] <= n, k++]; Fibonacci[k-2]]; a[n_] := A130312[1 + Max[FactorInteger[n][[;;, 2]]]]; a[1] = 0; Array[a, 100]
  • PARI
    A130312(n) = {my(k = 0); while(fibonacci(k) <= n, k++); fibonacci(k-2);}
    a(n) = if(n == 1, 0, A130312(1 + vecmax(factor(n)[,2])));

Formula

a(n) = A130312(1 + A051903(n)).
a(n) = A000045(A375431(n)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1 + Sum_{k>=4} Fibonacci(k) * (1 - 1/zeta(Fibonacci(k)-1)) = 1.48543763231328442311... .

A095879 Numbers whose lazy Fibonacci representation has an odd number of summands.

Original entry on oeis.org

1, 2, 6, 8, 9, 10, 12, 13, 15, 19, 20, 24, 27, 29, 30, 31, 35, 37, 38, 39, 42, 43, 44, 46, 47, 49, 53, 55, 56, 57, 59, 60, 62, 66, 67, 68, 70, 74, 75, 79, 82, 84, 85, 86, 88, 89, 91, 95, 96, 100, 103, 105, 106, 107, 109, 113, 116, 118, 119, 120, 124, 126, 127, 128, 131, 132
Offset: 1

Views

Author

Clark Kimberling, Jun 10 2004

Keywords

Examples

			The first few lazy Fibonacci representations (as in A095791) are 1=1, 2=2, 4=3+1, 5=3+2, 6=3+2+1, 7=5+2, 8=5+2+1, so a(1), a(2), a(3) and a(4) are 1, 2, 6 and 8, respectively.
		

Crossrefs

Cf. A095880.
Showing 1-10 of 15 results. Next