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.

A375127 The anti-run-leader transformation for standard compositions.

Original entry on oeis.org

0, 1, 2, 3, 4, 2, 1, 7, 8, 4, 10, 5, 1, 1, 3, 15, 16, 8, 4, 9, 2, 10, 2, 11, 1, 1, 6, 3, 3, 3, 7, 31, 32, 16, 8, 17, 36, 4, 4, 19, 2, 2, 42, 21, 2, 2, 5, 23, 1, 1, 1, 3, 1, 6, 1, 7, 3, 3, 14, 7, 7, 7, 15, 63, 64, 32, 16, 33, 8, 8, 8, 35, 4, 36, 18, 9, 4, 4, 9
Offset: 0

Views

Author

Gus Wiseman, Aug 02 2024

Keywords

Comments

The a(n)-th composition in standard order lists the leaders of anti-runs of the n-th composition in standard order.
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.
Does this sequence contain all nonnegative integers?

Examples

			The 346th composition in standard order is (2,2,1,2,2), with anti-runs ((2),(2,1,2),(2)), with leaders (2,2,2). This is the 42nd composition in standard order, so a(346) = 42.
		

Crossrefs

Positions of elements of A233564 are A374638, counted by A374518.
Positions of elements of A272919 are A374519, counted by A374517.
Ranks of rows of A374515.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
All of the following pertain to compositions in standard order:
- Length is A000120.
- Sum is A029837(n+1) = A070939(n).
- Parts are listed by A066099.
- Number of adjacent equal pairs is A124762, unequal A333382.
- Run-length transform is A333627.
- Run-compression transform is A373948, sum A373953, excess A373954.
- Ranks of contiguous compositions are A374249, counted by A274174.
- Run-sum transform is A353847.
Six types of runs:

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    stcinv[q_]:=Total[2^(Accumulate[Reverse[q]])]/2;
    Table[stcinv[First/@Split[stc[n],UnsameQ]],{n,0,100}]

Formula

A000120(a(n)) = A333381(n).
A065120(a(n)) = A065120(n).
A070939(a(n)) = A374516(n).