login
a(n) = (s(n)-s(n-1))/2, where s = A026139.
3

%I #21 Aug 28 2021 02:53:05

%S 1,2,1,3,2,1,2,1,3,3,2,1,3,2,1,2,1,3,2,1,2,1,3,3,2,1,3,3,2,1,3,2,1,2,

%T 1,3,3,2,1,3,2,1,2,1,3,2,1,2,1,3,3,2,1,3,2,1,2,1,3,2,1,2,1,3,3,2,1,3,

%U 3,2,1,3,2,1,2,1,3,3,2,1,3,3,2,1,3,2,1,2,1,3,3,2,1,3,2,1

%N a(n) = (s(n)-s(n-1))/2, where s = A026139.

%H Michael De Vlieger, <a href="/A026141/b026141.txt">Table of n, a(n) for n = 2..10002</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, r, s, nn = 105}, a[1] = 1; Do[If[! IntegerQ[a[#1]], Set[a[#1], i], Set[a[#2], i]] & @@ {i - #, i + #} &@ Floor[i/2], {i, 4 nn}]; s = TakeWhile[Array[a[#] &, 2 nn], IntegerQ]; Map[(#2 - #1)/2 & @@ # &, Partition[Union@ FoldList[Max, s], 2, 1]]] (* _Michael De Vlieger_, Aug 27 2021 *)

%Y Cf. A026136, A026139.

%K nonn

%O 2,2

%A _Clark Kimberling_

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