login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Unique sequence s starting with 1,2,1 such that if r(r(r(s) = s and r(s) != s and r(r(s) != s, where r(#) denotes the runlength sequence of a sequence #.
4

%I #4 Dec 21 2024 01:05:19

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

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

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

%N Unique sequence s starting with 1,2,1 such that if r(r(r(s) = s and r(s) != s and r(r(s) != s, where r(#) denotes the runlength sequence of a sequence #.

%C This sequence is one of three limiting rows of the array A378282. See A378282 for a guide to related arrays and sequences.

%t z = 18;

%t invRE[seq_, k_] := Flatten[Map[ConstantArray[#[[2]], #[[1]]] &,

%t Partition[Riffle[seq, {k, 2 - Mod[k + 1, 2]}, {2, -1, 2}], 2]]];

%t row1 = {1}; rows = {row1};

%t col = PadRight[{}, z, {1, 1, 2}]

%t Do[AppendTo[rows, invRE[Last[rows], col[[n]]]], {n, 2, Length[col]}]

%t rows // ColumnForm

%t Flatten[rows] (* A378282 *)

%t rows[[z - 2]]; (* A378283 *)

%t rows[[z - 1]]; (* A378284 *)

%t rows[[z]]; (* A378285 *)

%t Map[Length, rows] (* A378286 *)

%t (* _Peter J. C. Moses_, Nov 21 2024 *)

%Y Cf. A378282, A378283, A378285, A378286, A378303.

%K nonn

%O 1,2

%A _Clark Kimberling_, Dec 20 2024