A258245 Irregular triangle (Beatty tree for Pi) as determined in Comments; a permutation of the nonnegative integers.
0, 3, 1, 12, 6, 4, 40, 2, 15, 21, 13, 128, 5, 7, 9, 43, 50, 69, 41, 405, 25, 31, 14, 16, 18, 22, 131, 138, 160, 219, 129, 1275, 8, 10, 53, 59, 72, 81, 100, 42, 44, 47, 51, 70, 408, 414, 436, 505, 691, 406, 4008, 34, 17, 19, 23, 26, 28, 32, 141, 150, 163, 169
Offset: 1
Examples
Rows (or generations, or levels) of T: 0 3 1 12 6 4 40 2 21 15 13 128 9 7 69 5 50 43 42 405 31 25 22 219 18 16 160 14 138 131 129 1275 Generations 0 to 7 of the tree are drawn by the Mathematica program. In T, the path from 0 to 8 is (0,3,1,6,21,7,25,8). The path obtained by backtracking (i.e., successive applications of the mapping b in Comments) is (8,25,7,21,6,1,3,0).
Programs
-
Mathematica
r = Pi; 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, 8}] paths = Sort[Map[Reverse[b[#]] &, Last[generations]]] graph = DeleteDuplicates[Flatten[Map[Thread[Most[#] -> Rest[#]] &, paths]]] TreePlot[graph, Top, 0, VertexLabeling -> True, ImageSize -> 800] Map[DeleteDuplicates, Transpose[paths]] (* Peter J. C. Moses,May 21 2015 *)
Comments