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.

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]