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:
(1) the maximal weakly increasing runs in the reverse of the k-th composition in standard order do not have weakly decreasing leaders, and
(2) the maximal weakly increasing runs in the k-th composition in standard order do not have weakly decreasing leaders.
LINKS
EXAMPLE
Composition 89 is (2,1,3,1), which matches 2-3-1 but not 23-1.
Composition 165 is (2,3,2,1), which matches 23-1 but not 231.
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 sequence together with corresponding compositions begins:
421: (1,2,3,2,1)
649: (2,4,3,1)
802: (1,3,4,2)
809: (1,3,2,3,1)
837: (1,2,4,2,1)
843: (1,2,3,2,1,1)
933: (1,1,2,3,2,1)
1289: (2,5,3,1)
1299: (2,4,3,1,1)
1330: (2,3,1,3,2)
1445: (2,1,2,3,2,1)
1577: (1,4,2,3,1)
1602: (1,3,5,2)
1605: (1,3,4,2,1)
1617: (1,3,2,4,1)
1619: (1,3,2,3,1,1)
MATHEMATICA
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Select[Range[0, 1000], MatchQ[stc[#], {___, y_, z_, ___, x_, ___}/; x<y<z] && MatchQ[stc[#], {___, x_, ___, z_, y_, ___}/; x<y<z]&]
CROSSREFS
Compositions of this type are counted by A375297.
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 23 2024
STATUS
approved