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.

User: Michael Mays

Michael Mays's wiki page.

Michael Mays has authored 2 sequences.

A372768 The number of shaded cells in all compositions of n when light shines from the northwest. Here compositions are represented by stacked columns of adjacent cells.

Original entry on oeis.org

0, 1, 4, 13, 34, 85, 199, 454, 1011, 2220, 4813, 10351, 22104, 46948, 99266, 209113
Offset: 1

Author

Michael Mays, May 12 2024

Keywords

Examples

			For n=4, the composition 1+3 produces 3 shaded cells, 2+2 produces 1, 3+1 produces 2, 1+1+2 produces 1, 4 produces 6, and the others have no shaded cells, for a total of 13, so a(4) = 13.
		

Crossrefs

Cf. A366157.

A335296 Least index a(n) such that the sequences b(n,m) from A334539 are purely periodic after a(n).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 16, 24, 70, 31, 98, 112, 116, 170, 216, 488, 2012, 795, 328, 219, 2993, 4486, 1555, 814, 3575, 12296, 18386, 29659, 13665, 2162, 47685, 52346, 69061, 447927, 472933, 33798, 857812, 179171, 47447, 1195784, 332172, 618783, 248092, 3947618, 2718980, 15924182, 2857983, 3536883, 8606700
Offset: 1

Author

Elad Michael, May 30 2020

Keywords

Comments

By the pigeonhole principle, a(n) is upper bounded by n^n - n.

Examples

			The sequence b(3, m) is 1, 1, 2, 1, 2, 2, 2, 3, 1, 1, 2, ... which is periodic at index 1 with period 8.
The sequence b(8, m) is 1, 1, 2, 1, 3, 1, 4, ... 3, 4, 1, 2, 3, 3, 4, 2, 2, 3, 3, 4, 2, 3, 3, 4, 2, 2, 3, 3, ... which is periodic at index 24 with period 9.
		

Crossrefs

Cf. A334539.

Programs

  • Python
    def a(n):
        b = [1];
        for i in range(2,n+1):
            b.append(b.count(b[-1]));
        prev = {tuple(b):1};
        m = 1;
        while(True):
            b.append(b.count(b[-1]));
            del b[0];
            m += 1;
            if(tuple(b) in prev):
                return prev[tuple(b)]
            else:
                prev[tuple(b)] = m;