A378305 Unique sequence s starting with 2,1,2 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 #.
2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 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, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1
Offset: 1
Keywords
Programs
-
Mathematica
z = 18; invRE[seq_, k_] := Flatten[Map[ConstantArray[#[[2]], #[[1]]] &, Partition[Riffle[seq, {k, 2 - Mod[k + 1, 2]}, {2, -1, 2}], 2]]]; row1 = {1}; rows = {row1}; col = PadRight[{}, z, {1, 2, 2}] Do[AppendTo[rows, invRE[Last[rows], col[[n]]]], {n, 2, Length[col]}] rows // ColumnForm (* A378303 *) rows[[z - 2]]; (* A378304 *) rows[[z - 1]]; (* A378305 *) rows[[z]]; (* A378306 *) Map[Length, rows] (* A378307 *) (* Peter J. C. Moses, Nov 21 2024 *)
Comments