OFFSET
1,4
EXAMPLE
First eleven rows of array A378282:
1
1
2
1 1
1 2
2 1 1
1 1 2 1
1 2 1 1 2
2 1 1 2 1 2 2
1 1 2 1 2 2 1 2 2 1 1
1 2 1 1 2 1 1 2 2 1 2 2 1 1 2 2 1
a(11) = 16 = number of terms in row 11.
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[{}, 30, {1, 1, 2}](*112112112112112112...*);
Do[AppendTo[rows, invRE[Last[rows], col[[n]]]], {n, 2, Length[col]}]
rows // ColumnForm; (* A378282 *)
Map[Length, rows] (* this sequence *)
(* Peter J. C. Moses, Nov 21 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Dec 20 2024
STATUS
approved