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.

A382288 Number of records in the n-th composition in standard order.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1
Offset: 0

Views

Author

John Tyler Rascoe, Mar 20 2025

Keywords

Comments

Here a record is a part of the composition that is greater than all parts before it, reading left to right. The first part of any nonempty composition is a record so a(n) >= 1 for n > 0. See A066099 for the standard order of integer compositions.
The first appearance of k occurs at n = A164894(k) for k > 0.

Examples

			The 883rd composition is (1, 2, 1, 1, 3, 1, 1) with records 1, 2, and 3; so a(883) = 3.
                          ^  ^        ^
		

Crossrefs

Programs

  • Python
    def comp(n):
        return # see A357625
    def A382288(n):
        r,c = 0,0
        for i in comp(n):
            if i > r:
                c += 1
                r = i
        return c

Formula

a(A164894(n)) = n for n > 0.