cp's OEIS Frontend

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.

Showing 1-8 of 8 results.

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.

Original entry on oeis.org

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, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1
Offset: 1

Views

Author

Clark Kimberling, Dec 08 2024

Keywords

Comments

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.
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.
This guide is a table of four columns:
col 1: (row 1 of A)
col 2: fundamental period of column 1 of A
col 3: limiting sequence of array (possibly several)
col 4: runlength sequence of sequence in column 3
***
col 1 col 2 col 3 col 4
(1) (1,2) A025142 A025143
(2) (2,1) A025143 A025142
(1) (1,1,2) A378283 A378285
(1) (1,2,1) A378284 A378283
(2) (2,1,1) A378285 A378284
(1) (1,1,2) A378304 A378306
(2) (2,1,2) A378305 A378304
(2) (2,2,1) A378306 A378305

Examples

			First eleven rows:
  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
(row 8) = (1,2,1,1,2) has runlength sequence (1,1,2,1) = (row 7).
		

Crossrefs

Cf. A270641, A378284, A378285, A378286 (row lengths).

Programs

  • 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, 1, 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 *)

A270642 The sequence a of 1's and 2's starting with (1,1,2,2) such that a(n) is the length of the (n+2)nd run of a.

Original entry on oeis.org

1, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 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, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1
Offset: 1

Views

Author

Clark Kimberling, Apr 06 2016

Keywords

Comments

See A270641 for a guide to related sequences.

Examples

			a(1) = 1, so the 3rd run has length 1, so a(5) must be 1.
a(2) = 1, so the 4th run has length 1, so a(6) = 2 and a(7) = 1.
a(3) = 2, so the 5th run has length 2, so a(8) = 1 and a(9) = 2.
a(4) = 2, so the 6th run has length 2, so a(10) = 2 and a(11) = 1.
Globally, the runlength sequence is 2,2,1,1,2,2,1,2,1,1,2,2,1,2,..., and deleting the first 2 terms leaves the same sequence.
		

Crossrefs

Programs

  • Mathematica
    a = {1, 1, 2, 2}; Do[a = Join[a, ConstantArray[If[Last[a] == 1, 2, 1], {a[[n]]}]], {n,   200}]; a  (* Peter J. C. Moses, Apr 01 2016 *)

A270643 The sequence a of 1's and 2's starting with (1,2,2,1) such that a(n) is the length of the (n+3)rd run of a.

Original entry on oeis.org

1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 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, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1
Offset: 1

Views

Author

Clark Kimberling, Apr 06 2016

Keywords

Comments

See A270641 for a guide to related sequences.

Examples

			a(1) = 1, so the 4th run has length 1, so a(5) must be 1 and a(6) must be 2.
a(2) = 2, so the 5th run has length 2, so a(7) = 1 and a(8) = 2.
a(3) = 2, so the 6th run has length 2, so a(9) = 2 and a(10) = 1.
Globally, the runlength sequence is 1,2,1,1,2,2,1,2,1,1,2,2,1,2,2,1,...., and deleting the first 3 terms leaves the same sequence.
		

Crossrefs

Programs

  • Mathematica
    a = {1, 2, 2, 1}; Do[a = Join[a, ConstantArray[If[Last[a] == 1, 2, 1], {a[[n]]}]], {n,   200}]; a  (* Peter J. C. Moses, Apr 01 2016 *)

Formula

Conjecture: a(n) = A270642(n+1). - R. J. Mathar, Jun 21 2025

A270644 The sequence a of 1's and 2's starting with (1,2,2,2) such that a(n) is the length of the (n+2)nd run of a.

Original entry on oeis.org

1, 2, 2, 2, 1, 2, 2, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 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, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1
Offset: 1

Views

Author

Clark Kimberling, Apr 06 2016

Keywords

Comments

See A270641 for a guide to related sequences.

Examples

			a(1) = 1, so the 3rd run has length 1, so a(5) must be 1 and a(6) = 2.
a(2) = 2, so the 4th run has length 2, so a(7) = 2 and a(8) = 1.
a(3) = 2, so the 5th run has length 2, so a(9) = 1and a(10) = 2.
Globally, the runlength sequence is 1,3,1,2,2,2,1,2,2,1,1,2,2,1,2,2,..., and deleting the first 2 terms leaves the same sequence.
		

Crossrefs

Programs

  • Mathematica
    a = {1, 2, 2, 2}; Do[a = Join[a, ConstantArray[If[Last[a] == 1, 2, 1], {a[[n]]}]], {n,   200}]; a  (* Peter J. C. Moses, Apr 01 2016 *)

A270645 The sequence a of 1's and 2's starting with (2,1,1,1) such that a(n) is the length of the (n+2)nd run of a.

Original entry on oeis.org

2, 1, 1, 1, 2, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2
Offset: 1

Views

Author

Clark Kimberling, Apr 06 2016

Keywords

Comments

See A270641 for a guide to related sequences.

Examples

			a(1) = 1, so the 3rd run has length 2, so a(5) must be 2 and a(6) = 2.
a(2) = 2, so the 4th run has length 1, so a(7) = 1 and a(8) = 2.
a(3) = 1, so the 5th run has length 1, so a(9) = 1 and a(10) = 2.
Globally, the runlength sequence is 1,3,2,1,1,1,2,2,1,2,1,2,2,1,1,..., and deleting the first 2 terms leaves the same sequence.
		

Crossrefs

Programs

  • Mathematica
    a = {2,1,1,1}; Do[a = Join[a, ConstantArray[If[Last[a] == 1, 2, 1], {a[[n]]}]], {n,   200}]; a  (* Peter J. C. Moses, Apr 01 2016 *)

A270646 The sequence a of 1's and 2's starting with (2,2,1,1) such that a(n) is the length of the (n+2)nd run of a.

Original entry on oeis.org

2, 2, 1, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 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, 2, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 1, 1
Offset: 1

Views

Author

Clark Kimberling, Apr 07 2016

Keywords

Comments

See A270641 for a guide to related sequences.
a(1) = 2, so the 3rd run has length 2, so a(5) must be 2 and a(6) = 1.
a(2) = 2, so the 4th run has length 2, so a(7) = 1 and a(8) = 1.
a(3) = 1, so the 5th run has length 1, so a(9) = 2 and a(10) = 1.
Globally, the runlength sequence of a is 2,2,2,2,1,1,2,2,1,1,2,1,2,2,1,1,2,..., and deleting the first 2 terms leaves a = A270646.

Crossrefs

Programs

  • Mathematica
    a = {2,2,1,1}; Do[a = Join[a, ConstantArray[If[Last[a] == 1, 2, 1], {a[[n]]}]], {n,   200}]; a  (* Peter J. C. Moses, Apr 01 2016 *)

A270647 The sequence a of 1's and 2's starting with (2,2,1,2) such that a(n) is the length of the (n+3)rd run of a.

Original entry on oeis.org

2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 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, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2
Offset: 1

Views

Author

Clark Kimberling, Apr 07 2016

Keywords

Comments

See A270641 for a guide to related sequences.

Examples

			a(1) = 2, so the 4th run has length 2, so a(5) must be 1 and a(6) = 1.
a(2) = 2, so the 5th run has length 2, so a(7) = 2 and a(8) = 2.
a(3) = 1, so the 6th run has length 1, so a(9) = 1 and a(10) = 2.
Globally, the runlength sequence of a is 2,1,1,2,2,1,2,1,1,2,2,1,2,2,1,2,1,1,2,..., and deleting the first 3 terms leaves a = A270647.
		

Crossrefs

Programs

  • Mathematica
    a = {2,2,1,2}; Do[a = Join[a, ConstantArray[If[Last[a] == 1, 2, 1], {a[[n]]}]], {n,   200}]; a  (* Peter J. C. Moses, Apr 01 2016 *)

Formula

Conjecture: a(n) = A270643(n+1). - R. J. Mathar, Jun 21 2025

A270648 The sequence a of 1's and 2's starting with (2,2,2,2) such that a(n) is the length of the (n+1)st run of a.

Original entry on oeis.org

2, 2, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1, 2, 1, 1
Offset: 1

Views

Author

Clark Kimberling, Apr 07 2016

Keywords

Comments

See A270641 for a guide to related sequences.

Examples

			a(1) = 2, so the 2nd run has length 2, so a(5) must be 1 and a(6) = 1.
a(2) = 2, so the 3rd run has length 2, so a(7) = 2 and a(8) = 2.
a(3) = 2, so the 4th run has length 2, so a(9) = 1 and a(10) = 1.
Globally, the runlength sequence of a is 4,2,2,2,2,1,1,2,2,1,1,2,2,1,2,1,1,2,..., and deleting the first term leaves a = A270648.
		

Crossrefs

Programs

  • Mathematica
    a = {2,2,2,2}; Do[a = Join[a, ConstantArray[If[Last[a] == 1, 2, 1], {a[[n]]}]], {n,   200}]; a  (* Peter J. C. Moses, Apr 01 2016 *)
Showing 1-8 of 8 results.