OFFSET
1,2
COMMENTS
See A378282 for a guide to related arrays and sequences.
EXAMPLE
First nine rows:
1
2
2, 2
1, 1, 2, 2
2, 1, 2, 2, 1, 1
2, 2, 1, 2, 2, 1, 1, 2, 1
1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1
2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1
2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2
(row 9) = (2,2,1,2,2,1,...) has runlength sequence (2,1,2,2,...) = (row 8).
MATHEMATICA
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[{}, 18, {1, 2, 2}]
Do[AppendTo[rows, invRE[Last[rows], col[[n]]]], {n, 2, Length[col]}]
rows // ColumnForm (* array *)
Flatten[rows] (* sequence *)
(* Peter J. C. Moses, Nov 21 2024 *)
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Clark Kimberling, Dec 20 2024
STATUS
approved