OFFSET
1,1
COMMENTS
The n-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 n, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.
LINKS
Mathematics Stack Exchange, What is a sequence run? (answered 2011-12-01)
EXAMPLE
The terms together with their binary expansions and corresponding compositions begin:
13: 1101 (1,2,1)
22: 10110 (2,1,2)
25: 11001 (1,3,1)
45: 101101 (2,1,2,1)
46: 101110 (2,1,1,2)
49: 110001 (1,4,1)
53: 110101 (1,2,2,1)
54: 110110 (1,2,1,2)
59: 111011 (1,1,2,1,1)
76: 1001100 (3,1,3)
77: 1001101 (3,1,2,1)
82: 1010010 (2,3,2)
89: 1011001 (2,1,3,1)
91: 1011011 (2,1,2,1,1)
93: 1011101 (2,1,1,2,1)
94: 1011110 (2,1,1,1,2)
MATHEMATICA
stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Select[Range[0, 100], !UnsameQ@@Split[stc[#]]&]
CROSSREFS
Normal multisets with a permutation of this type appear to be A283353.
A011782 counts integer compositions.
A044813 lists numbers whose binary expansion has all distinct run-lengths.
Counting words with all distinct runs:
- A351202 = permutations of prime factors.
- Length is A000120.
- Sum is A070939.
- Heinz number is A333219.
- Number of distinct parts is A334028.
Selected classes of standard compositions:
- Strict compositions are A233564.
- Constant compositions are A272919.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Feb 12 2022
STATUS
approved