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)
10: (2,2)
18: (3,2)
20: (2,3)
34: (4,2)
40: (2,4)
66: (5,2)
80: (2,5)
130: (6,2)
160: (2,6)
258: (7,2)
292: (3,3,3)
320: (2,7)
514: (8,2)
548: (4,3,3)
580: (3,4,3)
584: (3,3,4)
640: (2,8)
1026: (9,2)
1060: (5,3,3)
1092: (4,4,3)
1096: (4,3,4)
MATHEMATICA
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Select[Range[0, 1000], Min[stc[#]]==Length[stc[#]]&]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Oct 23 2025
STATUS
approved
