login
A026137
a(n) = position of n in A026136.
4
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, 14, 42, 43, 45, 46, 48, 17, 51, 52, 54, 55, 57, 20, 60, 61, 63, 22, 66, 23, 69, 70, 72, 73, 75, 26, 78, 79, 81, 28, 84, 29, 87, 88, 90, 31, 93, 32
OFFSET
1,2
LINKS
F. M. Dekking, Permutations of N generated by left-right filling algorithms, arXiv:2001.08915 [math.CO], 2020.
MATHEMATICA
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 *)
CROSSREFS
Cf. A026136.
Sequence in context: A131008 A131166 A131157 * A026173 A026187 A026211
KEYWORD
nonn
EXTENSIONS
Edited by N. J. A. Sloane, Jan 31 2020
STATUS
approved