A258243 Irregular triangle (Beatty tree for e) as determined in Comments; a permutation of the nonnegative integers.
0, 2, 1, 8, 3, 5, 24, 10, 16, 9, 67, 4, 6, 29, 46, 25, 27, 184, 19, 11, 13, 17, 70, 76, 81, 127, 68, 502, 7, 32, 38, 48, 54, 26, 28, 30, 47, 187, 192, 209, 222, 347, 185, 1367, 12, 14, 18, 20, 21, 84, 89, 106, 133, 149, 69, 71, 73, 77, 78, 82, 128, 130, 505
Offset: 1
Examples
Rows (or generations, or levels) of T: 0 2 1 8 5 3 24 16 10 9 67 6 46 4 29 27 25 184 19 17 127 13 11 81 76 70 68 502 Generations 0 to 8 of the tree are drawn by the Mathematica program. In T, the path from 0 to 20 is (0,2,1,5,16,6,19,54,20). The path obtained by backtracking (i.e., successive applications of the mapping b in Comments) is (20,54,19,6,16,5,1,2,0).
Programs
-
Mathematica
r = E; 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 -> 850] Map[DeleteDuplicates, Transpose[paths]] (* Peter J. C. Moses,May 21 2015 *)
Comments