A258241 Irregular triangle (Beatty tree for r = sqrt(3)), T, of all nonnegative integers, each exactly once, as determined in Comments.
0, 1, 3, 2, 6, 4, 5, 12, 7, 8, 10, 22, 15, 19, 13, 39, 9, 11, 24, 27, 23, 34, 69, 14, 16, 17, 20, 48, 60, 40, 41, 43, 121, 31, 36, 25, 28, 29, 35, 72, 76, 84, 105, 70, 71, 211, 18, 21, 45, 51, 64, 42, 44, 49, 50, 55, 61, 62, 126, 147, 183, 122, 124, 133, 367
Offset: 1
Examples
Rows (or generations, or levels) of T: 0 1 3 2 6 4 5 12 7 8 10 22 15 19 13 39 9 11 24 27 23 34 69 14 16 17 20 48 60 40 41 43 121 Generations 0 to 10 of the tree are drawn by the Mathematica program. In T, the path from 0 to 16 is (0,1,3,6,4,8,15,27,16). The path obtained by backtracking (i.e., successive applications of the mapping b in Comments) is (16,27,15,8,4,6,3,1,0).
Programs
-
Mathematica
r = Sqrt[3]; 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, 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]] (* Peter J. C. Moses,May 21 2015 *)
Comments