OFFSET
1,3
COMMENTS
The leaders of weakly decreasing runs in a sequence are obtained by splitting into maximal weakly decreasing subsequences 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.
LINKS
EXAMPLE
The terms together with the corresponding compositions begin:
0: ()
1: (1)
2: (2)
3: (1,1)
4: (3)
5: (2,1)
7: (1,1,1)
8: (4)
9: (3,1)
10: (2,2)
11: (2,1,1)
15: (1,1,1,1)
16: (5)
17: (4,1)
18: (3,2)
19: (3,1,1)
21: (2,2,1)
22: (2,1,2)
23: (2,1,1,1)
31: (1,1,1,1,1)
MATHEMATICA
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Select[Range[0, 100], SameQ@@First/@Split[stc[#], GreaterEqual]&]
CROSSREFS
Other types of runs and their counts: A272919 (A000005), A374519 (A374517), A374685 (A374686), A374759 (A374760).
Compositions of this type are counted by A374742.
A011782 counts compositions.
A374748 counts compositions by sum of leaders of weakly decreasing runs.
All of the following pertain to compositions in standard order:
- Length is A000120.
- Parts are listed by A066099.
- Run-length transform is A333627.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 24 2024
STATUS
approved