A345253 Maximal Fibonacci tree: Arrangement of the positive integers as labels of a complete binary tree.
1, 2, 3, 4, 5, 6, 8, 7, 9, 10, 13, 11, 14, 16, 21, 12, 15, 17, 22, 18, 23, 26, 34, 19, 24, 27, 35, 29, 37, 42, 55, 20, 25, 28, 36, 30, 38, 43, 56, 31, 39, 44, 57, 47, 60, 68, 89, 32, 40, 45, 58, 48, 61, 69, 90, 50, 63, 71, 92, 76, 97, 110, 144, 33, 41, 46, 59, 49
Offset: 1
Examples
As a complete binary tree: 1 / \ 2 3 / \ / \ 4 5 6 8 / \ / \ / \ / \ 7 9 10 13 11 14 16 21 / \ / \ / \ / \ / \ / \ / \ / \ ... By maximal Fibonacci expansion: F(1) / \ F(1) + F(2) F(1) + F(3) / \ / \ F(1) + F(2) + F(3) F(1) + F(2) + F(4) F(1) + F(3) + F(4) F(1) + F(3) + F(5) ... "Fibonacci gaps," or differences between successive indices in maximal Fibonacci expansion above, are A007931(n-1) for n > 1 (see link): * / \ 1 2 / \ / \ 11 12 21 22 / \ / \ / \ / \ 111 112 121 122 211 212 221 222 / \ / \ / \ / \ / \ / \ / \ / \ ... In examples of the three methods below: Branch left-right-right down the tree to arrive at nodal position n = 2*(2*(2*1) + 1) + 1 = 11; Branch right-left-left down the tree to arrive at nodal position n = 2*(2*(2*1 + 1)) = 12. Tree by inner composition of (one plus) the lower and upper Wythoff sequences, A000201 and A001950 (Method 1): a(11) = A000201(A001950(A001950(1) + 1) + 1) + 1 = 13. a(12) = A001950(A000201(A000201(1) + 1) + 1) + 1 = 11. Tree by (outer) composition of branching functions L(n) = n + F(Finv(n)) and R(n) = n + F(Finv(n) + 1), where F(n) = A000045(n) and Finv(n) = A130233(n) (Method 2): a(11) = R(R(L(1))) = 13. a(12) = L(R(R(1))) = 11. Tree by outer composition of A060143 and A060144 (Wythoff inverse sequences) (Method 3): a(11) = 13, position of first nonzero in A060144(A060144(A060143(m))) = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, ..., for m = 1, 2, 3, .... a(12) = 11, position of first nonzero in A060143(A060143(A060144(m))) = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, ..., for m = 1, 2, 3, ....
Links
- Parker Shectman, A Quilt after Fibonacci, Part 2 of 3: Cohorts, Free Monoids, and Numeration
- J. Parker Shectman, Mathematica codes for generating A345253 as a binary tree
Crossrefs
Programs
-
Mathematica
(* For binary tree implementations, see supporting file under LINKS *) a[n_] := (x = 0; y = 0; BDn = Reverse[IntegerDigits[n, 2]]; imax = Length[BDn] - 1; For[i = 0, i <= imax, i++, {x, y} = {y + 1, x + y}; If[BDn[[i + 1]] == 1, {x, y} = {y, x + y}]]; y); (* Adapted from PARI code of Kevin Ryde *)
-
PARI
a(n) = my(x=0,y=0); for(i=0,logint(n,2), [x,y]=[y+1,x+y]; if(bittest(n,i), [x,y]=[y,x+y])); y; \\ Kevin Ryde, Jun 19 2021
Comments