OFFSET
0,3
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.
Every sequence can be uniquely split into a sequence of non-overlapping runs. For example, the runs of (2,2,1,1,1,3,2,2) are ((2,2),(1,1,1),(3),(2,2)), with sums (4,3,3,4).
EXAMPLE
The terms together with their binary expansions and corresponding compositions begin:
0: 0 ()
1: 1 (1)
2: 10 (2)
3: 11 (1,1)
4: 100 (3)
5: 101 (2,1)
6: 110 (1,2)
7: 111 (1,1,1)
8: 1000 (4)
9: 1001 (3,1)
10: 1010 (2,2)
12: 1100 (1,3)
15: 1111 (1,1,1,1)
16: 10000 (5)
17: 10001 (4,1)
18: 10010 (3,2)
19: 10011 (3,1,1)
20: 10100 (2,3)
21: 10101 (2,2,1)
23: 10111 (2,1,1,1)
MATHEMATICA
stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Select[Range[0, 100], UnsameQ@@Total/@Split[stc[#]]&]
CROSSREFS
The version for runs in binary expansion is A175413.
These compositions are counted by A353850.
A005811 counts runs in binary expansion.
A011782 counts compositions.
A304442 counts partitions with all equal run-sums.
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 31 2022
STATUS
approved