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.

A378307 a(n) is the number of terms in row n of the array A378303.

Original entry on oeis.org

1, 1, 2, 4, 6, 9, 14, 21, 31, 48, 71, 105, 159, 237, 358, 538, 808, 1212, 1821, 2731, 4098, 6148, 9221, 13829, 20742, 31107, 46672, 70004, 104968, 157463, 236181, 354207, 531340, 796994, 1195379, 1793124, 2689738, 4034554, 6051988, 9077930
Offset: 1

Views

Author

Clark Kimberling, Dec 21 2024

Keywords

Examples

			First eight rows of array A378303:
   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
   a(8) = 26 = number of terms in row 8.
		

Crossrefs

Programs

  • Mathematica
    z = 47;
    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]}]
    Map[Length, rows]

A378283 Unique sequence s starting with 1,1,2,1 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 #.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Dec 16 2024

Keywords

Comments

This sequence is one of three limiting rows of the array A378282. See A378282 for a guide to related arrays and sequences.

Crossrefs

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, 1, 2}]
    Do[AppendTo[rows, invRE[Last[rows], col[[n]]]], {n, 2, Length[col]}]
    rows // ColumnForm
    Flatten[rows]   (* A378282 *)
    rows[[z - 2]];  (* A378283 *)
    rows[[z - 1]];  (* A378284 *)
    rows[[z]];      (* A378285 *)
    Map[Length, rows]   (* A378286 *)
    (* Peter J. C. Moses, Nov 21 2024 *)

A378284 Unique sequence s starting with 1,2,1 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 #.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Dec 20 2024

Keywords

Comments

This sequence is one of three limiting rows of the array A378282. See A378282 for a guide to related arrays and sequences.

Crossrefs

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, 1, 2}]
    Do[AppendTo[rows, invRE[Last[rows], col[[n]]]], {n, 2, Length[col]}]
    rows // ColumnForm
    Flatten[rows]   (* A378282 *)
    rows[[z - 2]];  (* A378283 *)
    rows[[z - 1]];  (* A378284 *)
    rows[[z]];      (* A378285 *)
    Map[Length, rows]   (* A378286 *)
    (* Peter J. C. Moses, Nov 21 2024 *)

A378285 Unique sequence s starting with 2,1 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 #.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Dec 20 2024

Keywords

Comments

This sequence is one of three limiting rows of the array A378282. See A378282 for a guide to related arrays and sequences.

Crossrefs

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, 1, 2}]
    Do[AppendTo[rows, invRE[Last[rows], col[[n]]]], {n, 2, Length[col]}]
    rows // ColumnForm
    Flatten[rows]   (* A378282 *)
    rows[[z - 2]];  (* A378283 *)
    rows[[z - 1]];  (* A378284 *)
    rows[[z]];      (* A378285 *)
    Map[Length, rows]   (* A378286 *)
    (* Peter J. C. Moses, Nov 21 2024 *)

A378304 Unique sequence s starting with 1,1,2,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 #.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Dec 20 2024

Keywords

Comments

This sequence is one of three limiting rows of the array A378303. See A378282 for a guide to related arrays and sequences.

Crossrefs

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 *)

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 #.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Dec 20 2024

Keywords

Comments

This sequence is one of three limiting rows of the array A378303. See A378282 for a guide to related arrays and sequences.

Crossrefs

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 *)

A378306 Unique sequence s starting with 2,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 #.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Dec 20 2024

Keywords

Comments

This sequence is one of three limiting rows of the array A378303. See A378282 for a guide to related arrays and sequences.

Crossrefs

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 *)

A380560 Rectangular array R, read by descending antidiagonals: (row 1) = (R(1,k)) = (A006337(k)), k >= 1; (row n+1) = inverse runlength sequence of row n; and R(n,1) = 1 for n >=1, See Comments.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jan 27 2025

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 consists solely of 1s. No two rows are identical.
Row 1: A006337; limiting row: A000002 (Kolakoski sequence).
Guide to related sequences (arrays):
A378282, limiting sequences of periodic inverse runlength arrays
A380560, (row 1)=A006337, periodic (column 1)=(1,...)
A380561, (row 1)=A006337, periodic (column 1)=(1,1,2,...)
A380562, (row 1)=A006337, periodic (column 1)=(1,2,2,...)
A380563, (row 1)=1+A010060, periodic (column 1)=(1,...)
A378303, (ro1 1)=A006337, periodic (column 1)=(2,2,1,...)
A378396, self-inverse runlength array, u = v = 1+A010060
A378397, self-inverse runlength array, u = v = A003842
A378398, self-inverse runlength array, u = v = A014675
A378399, self-inverse runlength array, u = v = A006337

Examples

			Corner:
  1 2 1 2 1 1 2 1 2 1 1 2 1 2 1 2 1 1 2 1
  1 2 2 1 2 2 1 2 1 1 2 1 1 2 1 2 2 1 2 2
  1 2 2 1 1 2 1 1 2 2 1 2 2 1 2 1 1 2 1 2
  1 2 2 1 1 2 1 2 2 1 2 1 1 2 2 1 2 2 1 1
  1 2 2 1 1 2 1 2 2 1 2 2 1 1 2 1 1 2 1 2
  1 2 2 1 1 2 1 2 2 1 2 2 1 1 2 1 1 2 2 1
  1 2 2 1 1 2 1 2 2 1 2 2 1 1 2 1 1 2 2 1
		

Crossrefs

Cf. A000002, A000012 (column 1), A006337.

Programs

  • Mathematica
    invR[seq_] := Flatten[Map[ConstantArray[#[[2]], #[[1]]] &,
        Partition[Riffle[seq, {1, 2}, {2, -1, 2}], 2]]];
    s = Differences[Table[Floor[n*Sqrt[2]], {n, 1, 21}]]; (* A006337 *)
    t = NestList[invR, s, 12];
    u[n_] := Take[t[[n]], 20];
    Table[u[n], {n, 1, 12}]  (* array *)
    v[n_, k_] := t[[n]][[k]];
    Table[v[n - k + 1, k], {n, 12}, {k, n, 1, -1}] // Flatten (* sequence *)
    (* Peter J. C. Moses, Nov 13 2024 *)
Showing 1-8 of 8 results.