A258247 Irregular triangle (Beatty tree for sqrt(8)) as determined in Comments; a permutation of the nonnegative integers.
0, 2, 1, 8, 3, 5, 25, 11, 16, 9, 73, 4, 6, 28, 33, 48, 26, 209, 19, 10, 12, 14, 17, 76, 82, 96, 138, 74, 593, 7, 36, 42, 50, 56, 27, 29, 31, 34, 49, 212, 217, 234, 274, 393, 210, 1680, 13, 15, 18, 20, 22, 84, 90, 98, 104, 121, 144, 161, 75, 77, 79, 83, 97
Offset: 1
Examples
Rows (or generations, or levels) of T: 0 2 1 8 3 5 25 11 16 9 73 4 6 28 33 48 26 209 19 10 12 14 16 76 82 96 138 74 593 Generations 0 to 8 of the tree are drawn by the Mathematica program. In T, the path from 0 to 13 is (0,2,8,3,11,33,12,36,13). The path obtained by backtracking (i.e., successive applications of the mapping b in Comments) is (13,36,12,33,11,3,8,2,0).
Programs
-
Mathematica
r = Sqrt[8]; k = 2000; 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, 9}] paths = Sort[Map[Reverse[b[#]] &, Last[generations]]] graph = DeleteDuplicates[Flatten[Map[Thread[Most[#] -> Rest[#]] &, paths]]] TreePlot[graph, Top, 0, VertexLabeling -> True, ImageSize -> 900] Map[DeleteDuplicates, Transpose[paths]] (* Peter J. C. Moses,May 21 2015 *)
Comments