OFFSET
1,2
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.
LINKS
EXAMPLE
The terms together with corresponding standard compositions begin:
1: (1)
6: (1,2)
10: (2,2)
18: (3,2)
28: (1,1,3)
34: (4,2)
44: (2,1,3)
52: (1,2,3)
66: (5,2)
76: (3,1,3)
84: (2,2,3)
100: (1,3,3)
120: (1,1,1,4)
130: (6,2)
140: (4,1,3)
148: (3,2,3)
164: (2,3,3)
184: (2,1,1,4)
196: (1,4,3)
216: (1,2,1,4)
232: (1,1,2,4)
MATHEMATICA
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Select[Range[100], Last[stc[#]]==Length[stc[#]]&]
CROSSREFS
Length of standard composition is A000120.
Last part of standard composition is A001511.
First part of standard composition is A065120.
These compositions are counted by A212804.
This is 1 followed by 2*A355489.
A005811 counts runs in binary expansion.
A011782 counts compositions.
A124767 counts maximal runs in standard compositions.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Oct 24 2025
STATUS
approved
