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.
LINKS
EXAMPLE
The terms together with their corresponding standard compositions begin:
2: (2)
4: (3)
8: (4)
10: (2,2)
16: (5)
18: (3,2)
20: (2,3)
32: (6)
36: (3,3)
42: (2,2,2)
64: (7)
68: (4,3)
72: (3,4)
74: (3,2,2)
82: (2,3,2)
84: (2,2,3)
MATHEMATICA
nogapQ[m_]:=Or[m=={}, Union[m]==Range[Min[m], Max[m]]];
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Select[Range[100], !MemberQ[stc[#], 1]&&nogapQ[stc[#]]&]
CROSSREFS
See link for sequences related to standard compositions.
A subset of A022340.
These compositions are counted by A251729.
The unordered version (using Heinz numbers of partitions) is A356845.
A333217 ranks complete compositions.
A356233 counts factorizations into gapless numbers.
A356844 ranks compositions with at least one 1.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 01 2022
STATUS
approved