A258212 Irregular triangle (or "lower Wythoff tree", or Beatty tree for r = golden ratio ), T, of all nonnegative integers, each exactly once, as determined from the lower Wythoff sequence as described in Comments.
0, 1, 3, 2, 6, 4, 11, 8, 7, 19, 5, 12, 14, 32, 9, 21, 24, 20, 53, 16, 13, 15, 33, 35, 40, 87, 10, 22, 25, 27, 55, 58, 66, 54, 142, 17, 37, 42, 45, 34, 36, 41, 88, 90, 95, 108, 231, 29, 23, 26, 28, 56, 59, 61, 67, 69, 74, 144, 147, 155, 176, 143, 375, 18, 38
Offset: 1
Examples
Rows (or generations, or levels) of T: 0 1 3 6 2 11 4 19 7 8 32 12 14 5 53 20 21 24 9 87 33 35 13 40 15 16 Generations 0 to 10 of the tree are drawn by the Mathematica program. In T, the path from 0 to 35 is (0,1,3,6,11,7,12,21,35). The path obtained by backtracking (i.e., successive applications of the mapping b in Comments) is (35,21,12,7,11,6,3,1,0).
Programs
-
Mathematica
r = GoldenRatio; k = 1000; w = Map[Floor[r #] &, Range[k]]; f[x_] := f[x] = If[MemberQ[w, x], Floor[x/r], Floor[r*x]]; b := NestWhileList[f, #, ! # == 0 &] &; bs = Map[Reverse, Table[b[n], {n, 0, k}]]; generations = Table[DeleteDuplicates[Map[#[[n]] &, Select[bs, Length[#] > n - 1 &]]], {n, 11}] paths = Sort[Map[Reverse[b[#]] &, Last[generations]]] graph = DeleteDuplicates[Flatten[Map[Thread[Most[#] -> Rest[#]] &, paths]]] TreePlot[graph, Top, 0, VertexLabeling -> True, ImageSize -> 700] Map[DeleteDuplicates, Transpose[paths]] (*The numbers in each level of the tree*) (* Peter J. C. Moses, May 21 2015 *)
Comments