A258235 Irregular triangle (or "upper Wythoff tree", or Beatty tree for r = (golden ratio)^2), T, of all nonnegative integers, each exactly once, as determined from the upper Wythoff sequence as described in Comments.
0, 2, 1, 7, 3, 5, 20, 10, 15, 8, 54, 4, 6, 23, 28, 41, 21, 143, 9, 11, 13, 16, 18, 57, 62, 75, 109, 55, 376, 31, 36, 44, 49, 22, 24, 26, 29, 42, 146, 151, 164, 198, 287, 144, 986, 12, 14, 17, 19, 65, 70, 78, 83, 96, 112, 117, 130, 56, 58, 60, 63, 76, 110
Offset: 1
Examples
Rows (or generations, or levels) of T: 0 2 1 7 3 5 20 10 15 8 54 4 6 23 28 41 21 143 9 11 13 16 18 57 62 75 109 55 376 Generations 0 to 9 of the tree are drawn by the Mathematica program. In T, the path from 0 to 29 is (0,2,7,3,10,28,75,29). The path obtained by backtracking (i.e., successive applications of the mapping b in Comments) is (29,75,28,10,3,7,2,0).
Programs
-
Mathematica
r = (3 + Sqrt[5])/2; 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, 10}] paths = Sort[Map[Reverse[b[#]] &, Last[generations]]] graph = DeleteDuplicates[Flatten[Map[Thread[Most[#] -> Rest[#]] &, paths]]] TreePlot[graph, Top, 0, VertexLabeling -> True, ImageSize -> 1400] Map[DeleteDuplicates, Transpose[paths]] (* Peter J. C. Moses, May 21 2015 *)
Comments