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.

A374515 Irregular triangle read by rows where row n lists the leaders of anti-runs in the n-th composition in standard order.

Original entry on oeis.org

1, 2, 1, 1, 3, 2, 1, 1, 1, 1, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 4, 3, 3, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 5, 4, 4, 1, 3, 3, 3, 3, 3, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Gus Wiseman, Jul 31 2024

Keywords

Comments

Anti-runs summing to n are counted by A003242(n).
The leaders of anti-runs in a sequence are obtained by splitting it into maximal consecutive anti-runs (sequences with no adjacent equal terms) and taking the first term of each.
The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The maximal anti-runs of the 1234567th composition in standard order are ((3,2,1,2),(2,1,2,5,1),(1),(1)), so row 1234567 is (3,2,1,1).
The nonnegative integers, corresponding compositions, and leaders of anti-runs begin:
    0:      () -> ()        15: (1,1,1,1) -> (1,1,1,1)
    1:     (1) -> (1)       16:       (5) -> (5)
    2:     (2) -> (2)       17:     (4,1) -> (4)
    3:   (1,1) -> (1,1)     18:     (3,2) -> (3)
    4:     (3) -> (3)       19:   (3,1,1) -> (3,1)
    5:   (2,1) -> (2)       20:     (2,3) -> (2)
    6:   (1,2) -> (1)       21:   (2,2,1) -> (2,2)
    7: (1,1,1) -> (1,1,1)   22:   (2,1,2) -> (2)
    8:     (4) -> (4)       23: (2,1,1,1) -> (2,1,1)
    9:   (3,1) -> (3)       24:     (1,4) -> (1)
   10:   (2,2) -> (2,2)     25:   (1,3,1) -> (1)
   11: (2,1,1) -> (2,1)     26:   (1,2,2) -> (1,2)
   12:   (1,3) -> (1)       27: (1,2,1,1) -> (1,1)
   13: (1,2,1) -> (1)       28:   (1,1,3) -> (1,1)
   14: (1,1,2) -> (1,1)     29: (1,1,2,1) -> (1,1)
		

Crossrefs

Row-leaders of nonempty rows are A065120.
Row-lengths are A333381.
Row-sums are A374516.
Positions of identical rows are A374519 (counted by A374517).
Positions of distinct (strict) rows are A374638 (counted by A374518).
A106356 counts compositions by number of maximal anti-runs.
A238279 counts compositions by number of maximal runs
A238424 counts partitions whose first differences are an anti-run.
All of the following pertain to compositions in standard order:
- Length is A000120.
- Sum is A029837(n+1).
- Parts are listed by A066099.
- Number of adjacent equal pairs is A124762, unequal A333382.
- Anti-runs are ranked by A333489, counted by A003242.
- Run-length transform is A333627, sum A070939.
- Run-compression is A373948 or A374251, sum A373953, excess A373954.
- Ranks of contiguous compositions are A374249, counted by A274174.
Six types of maximal runs:

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[First/@Split[stc[n],UnsameQ],{n,0,100}]