This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A378282 #11 Dec 27 2024 09:28:07 %S 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, %T A378282 2,1,1,1,2,1,1,2,1,1,2,2,1,2,2,1,1,2,1,2,1,1,2,1,2,2,1,2,1,1,2,2,1,2, %U A378282 2,1,1,2,1,2,2,1,1,1,2,1,2,2,1,2,2,1 %N A378282 Irregular triangular T: (row 1) = (1); (row n+1) = inverse runlength sequence of row n, starting with 2 if r = 3k for some k, and 1 otherwise. See Comments. %C A378282 For present purposes, all sequences to be considered consist entirely of 1s and 2s. If u and v are such sequences (infinite or finite), we call v an inverse runlength sequence of u if u is the runlength sequence of v. Each u has two inverse runlength sequences, one with first term 1 and the other with first term 2. Consequently, an inverse runlength array, in which each row after the first is an inverse runlength sequence of the preceding row, is determined by its first column. In this array, the first column is periodic with period 1,1,2. As a result, the array has three limiting sequences: A378283, A378284, A378285. %C A378282 Generally, if the first column is periodic with fundamental period p, then the array has p distinct limiting sequences; otherwise, there is no limiting sequence; however, if a segment, of any length, occurs in a row, then it also occurs in a subsequent row. %C A378282 This guide is a table of four columns: %C A378282 col 1: (row 1 of A) %C A378282 col 2: fundamental period of column 1 of A %C A378282 col 3: limiting sequence of array (possibly several) %C A378282 col 4: runlength sequence of sequence in column 3 %C A378282 *** %C A378282 col 1 col 2 col 3 col 4 %C A378282 (1) (1) A000002 A000002 %C A378282 (1) (1,2) A025142 A025143 %C A378282 (2) (2,1) A025143 A025142 %C A378282 (1) (1,1,2) A378283 A378285 %C A378282 (1) (1,2,1) A378284 A378283 %C A378282 (2) (2,1,1) A378285 A378284 %C A378282 (1) (1,1,2) A378304 A378306 %C A378282 (2) (2,1,2) A378305 A378304 %C A378282 (2) (2,2,1) A378306 A378305 %e A378282 First eleven rows: %e A378282 1 %e A378282 1 %e A378282 2 %e A378282 1 1 %e A378282 1 2 %e A378282 2 1 1 %e A378282 1 1 2 1 %e A378282 1 2 1 1 2 %e A378282 2 1 1 2 1 2 2 %e A378282 1 1 2 1 2 2 1 2 2 1 1 %e A378282 1 2 1 1 2 1 1 2 2 1 2 2 1 1 2 2 1 %e A378282 (row 8) = (1,2,1,1,2) has runlength sequence (1,1,2,1) = (row 7). %t A378282 invRE[seq_, k_] := Flatten[Map[ConstantArray[#[[2]], #[[1]]] &, %t A378282 Partition[Riffle[seq, {k, 2 - Mod[k + 1, 2]}, {2, -1, 2}], 2]]]; %t A378282 row1 = {1}; rows = {row1}; %t A378282 col = PadRight[{}, 18, {1, 1, 2}] %t A378282 Do[AppendTo[rows, invRE[Last[rows], col[[n]]]], {n, 2, Length[col]}] %t A378282 rows // ColumnForm (* array *) %t A378282 Flatten[rows] (* sequence *) %t A378282 (* _Peter J. C. Moses_, Nov 21 2024 *) %Y A378282 Cf. A270641, A378284, A378285, A378286 (row lengths). %K A378282 nonn,tabf %O A378282 1,3 %A A378282 _Clark Kimberling_, Dec 08 2024