OFFSET
1,1
COMMENTS
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.
These are also numbers k such that the maximal weakly increasing runs in the k-th composition in standard order do not have weakly decreasing leaders, where the leaders of weakly increasing runs in a sequence are obtained by splitting it into maximal weakly increasing subsequences and taking the first term of each.
The reverse version (A375138) ranks compositions matching the dashed pattern 23-1.
LINKS
Wikipedia, Permutation pattern.
EXAMPLE
Composition 102 is (1,3,1,2), which matches 1-3-2 but not 1-32.
Composition 210 is (1,2,3,2), which matches 1-32 but not 132.
Composition 358 is (2,1,3,1,2), which matches 2-3-1 and 1-3-2 but not 23-1 or 1-32.
The terms together with corresponding compositions begin:
50: (1,3,2)
98: (1,4,2)
101: (1,3,2,1)
114: (1,1,3,2)
178: (2,1,3,2)
194: (1,5,2)
196: (1,4,3)
197: (1,4,2,1)
202: (1,3,2,2)
203: (1,3,2,1,1)
210: (1,2,3,2)
226: (1,1,4,2)
229: (1,1,3,2,1)
242: (1,1,1,3,2)
MATHEMATICA
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Select[Range[0, 100], MatchQ[stc[#], {___, x_, ___, z_, y_, ___}/; x<y<z]&] (*1-32*)
CROSSREFS
The complement is too dense, but counted by A189076.
Compositions of this type are counted by A374636.
A011782 counts compositions.
All of the following pertain to compositions in standard order:
- Length is A000120.
- Sum is A029837(n+1).
- Leader is A065120.
- Strict compositions are A233564.
- Constant compositions are A272919.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 09 2024
STATUS
approved