OFFSET
1,1
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10922
F. M. Dekking, Permutations of N generated by left-right filling algorithms, arXiv:2001.08915 [math.CO], 2020.
MATHEMATICA
With[{s = Array[If[Mod[#/3^IntegerExponent[#, 3], 3] == 1, Ceiling[#/3], #] &[(6 # + 1)/4 - (-1)^#/4] &, Floor[2 #/3]] &[189]}, Array[FirstPosition[s, #][[1]] &, LengthWhile[Differences@ Union[s], # == 1 &]]] (* Michael De Vlieger, Aug 29 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved