login
a(n) = position of n in A026136.
4

%I #17 Apr 16 2020 18:50:30

%S 1,3,2,6,7,9,4,12,5,15,16,18,19,21,8,24,25,27,10,30,11,33,34,36,13,39,

%T 14,42,43,45,46,48,17,51,52,54,55,57,20,60,61,63,22,66,23,69,70,72,73,

%U 75,26,78,79,81,28,84,29,87,88,90,31,93,32

%N a(n) = position of n in A026136.

%H Sean A. Irvine, <a href="/A026137/b026137.txt">Table of n, a(n) for n = 1..10000</a>

%H F. M. Dekking, <a href="https://arxiv.org/abs/2001.08915">Permutations of N generated by left-right filling algorithms</a>, arXiv:2001.08915 [math.CO], 2020.

%t Block[{a, nn = 188}, a[1] = 1; Do[If[! IntegerQ[a[#1]], Set[a[#1], i], Set[a[#2], i]] & @@ {i - #, i + #} &@ Floor[i/2], {i, nn}]; a = TakeWhile[Array[a[#] &, nn], IntegerQ]; TakeWhile[Array[FirstPosition[a, #][[1]] &, nn], IntegerQ]] (* _Michael De Vlieger_, Apr 16 2020 *)

%Y Cf. A026136.

%K nonn

%O 1,2

%A _Clark Kimberling_

%E Edited by _N. J. A. Sloane_, Jan 31 2020