A323607 Triangular array: row n is the list of numbers from 1 to n, sorted in Sharkovsky order.
1, 2, 1, 3, 2, 1, 3, 4, 2, 1, 3, 5, 4, 2, 1, 3, 5, 6, 4, 2, 1, 3, 5, 7, 6, 4, 2, 1, 3, 5, 7, 6, 8, 4, 2, 1, 3, 5, 7, 9, 6, 8, 4, 2, 1, 3, 5, 7, 9, 6, 10, 8, 4, 2, 1, 3, 5, 7, 9, 11, 6, 10, 8, 4, 2, 1, 3, 5, 7, 9, 11, 6, 10, 12, 8, 4, 2, 1, 3, 5, 7, 9, 11, 13, 6, 10, 12, 8, 4, 2, 1
Offset: 1
Examples
Array begins: 1 2 1 3 2 1 3 4 2 1 3 5 4 2 1 3 5 6 4 2 1 3 5 7 6 4 2 1 3 5 7 6 8 4 2 1 3 5 7 9 6 8 4 2 1 3 5 7 9 6 10 8 4 2 1 3 5 7 9 11 6 10 8 4 2 1 3 5 7 9 11 6 10 12 8 4 2 1
Links
- Luc Rousseau, Array plot of the first 250 rows of the triangle
- Eric Weisstein's World of Mathematics, Sharkovsky's Theorem
Crossrefs
Cf. A323608.
Programs
-
Mathematica
lt[x_, y_] := Module[ {c, d, xx, yy, u, v}, {c, d} = IntegerExponent[#, 2] & /@ {x, y}; xx = x/2^c; yy = y/2^d; u = If[xx == 1, \[Infinity], c]; v = If[yy == 1, \[Infinity], d]; If[u != v, u < v, If[u == \[Infinity], c > d, xx < yy]]] row[n_] := Sort[Range[n], lt] row /@ Range[13] // Flatten