This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A323608 #24 Apr 02 2019 05:54:45 %S A323608 1,1,1,2,2,3,3,5,4,6,5,8,6,9,7,12,8,12,9,15,10,15,11,19,12,18,13,22, %T A323608 14,21,15,27,16,24,17,29,18,27,19,34,20,30,21,36,22,33,23,42,24,36,25, %U A323608 43,26,39,27,49,28,42,29,50,30,45,31,58,32,48,33,57,34,51,35,64,36,54,37,64,38,57,39,73 %N A323608 The position function the fractalization of which yields A323607. %C A323608 For a definition of the fractalization process, see comments in A194959. The sequence A323607, triangular array where row n is the list of the numbers from 1 to n sorted in Sharkovsky order, is clearly the result of a fractalization. Let {a(n)} (this sequence) be its position function. %F A323608 Empirical observations: (Start) %F A323608 For all odd numbers x >= 3, %F A323608 a(x) = (1/2)*x - 1/2, %F A323608 a(2x) = (3/4)*(2x) - 3/2, %F A323608 a(4x) = (7/8)*(4x) - 5/2, %F A323608 a(8x) = (15/16)*(8x) - 7/2, %F A323608 etc. %F A323608 For all c, a(2^c) = A000325(c) = 2^c-c. %F A323608 Summarized by: %F A323608 a((2^c)*(2k+1)) = A126646(c)*k + A000295(c) + A000007(k) = (2^(c+1)-1)*k + (2^c-1-c) + [k==0]. %F A323608 (End) %F A323608 From _Luc Rousseau_, Apr 01 2019: (Start) %F A323608 It appears that for all k > 0, %F A323608 a(4k + 0) = 3k - 2 + a(k), %F A323608 a(4k + 1) = 2k, %F A323608 a(4k + 2) = 3k, %F A323608 a(4k + 3) = 2k + 1. %F A323608 (End) %e A323608 In A323607 in triangular form, %e A323608 - row 5 is: 3 5 4 2 1 %e A323608 - row 6 is: 3 5 6 4 2 1 %e A323608 Row 6 is row 5 in which 6 has been inserted in position 3, so a(6) = 3. %t A323608 lt[x_, y_] := Module[ %t A323608 {c, d, xx, yy, u, v}, %t A323608 {c, d} = IntegerExponent[#, 2] & /@ {x, y}; %t A323608 xx = x/2^c; %t A323608 yy = y/2^d; %t A323608 u = If[xx == 1, \[Infinity], c]; %t A323608 v = If[yy == 1, \[Infinity], d]; %t A323608 If[u != v, u < v, If[u == \[Infinity], c > d, xx < yy]]] %t A323608 row[n_] := Sort[Range[n], lt] %t A323608 a[n_] := First[FirstPosition[row[n], n]] %t A323608 Table[a[n], {n, 1, 80}] %Y A323608 Cf. A194959 (introducing fractalization). %Y A323608 Cf. A323607 (fractalization of this sequence). %Y A323608 Cf. A126646, A000295, A000007. %Y A323608 Cf. A000325. %K A323608 nonn,look %O A323608 1,4 %A A323608 _Luc Rousseau_, Jan 19 2019