OFFSET
1,3
COMMENTS
First differs from A353696 (the consecutive version) in having 22318, corresponding to the binary word 101011100101110 and standard composition (2,2,1,1,3,2,1,1,2), whose run-lengths (2,2,1,1,2,1) are subsequence but not a consecutive subsequence.
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.
EXAMPLE
The initial terms, their binary expansions, and the corresponding standard compositions:
0: 0 ()
1: 1 (1)
2: 10 (2)
4: 100 (3)
8: 1000 (4)
10: 1010 (2,2)
16: 10000 (5)
32: 100000 (6)
43: 101011 (2,2,1,1)
58: 111010 (1,1,2,2)
64: 1000000 (7)
128: 10000000 (8)
256: 100000000 (9)
292: 100100100 (3,3,3)
349: 101011101 (2,2,1,1,2,1)
442: 110111010 (1,2,1,1,2,2)
512: 1000000000 (10)
586: 1001001010 (3,3,2,2)
676: 1010100100 (2,2,3,3)
697: 1010111001 (2,2,1,1,3,1)
MATHEMATICA
stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
rorQ[y_]:=Length[y]<=1||MemberQ[Subsets[y], Length/@Split[y]]&& rorQ[Length/@Split[y]];
Select[Range[0, 100], rorQ[stc[#]]&]
CROSSREFS
These compositions are counted by A353391.
A005811 counts runs in binary expansion.
A011782 counts compositions.
Statistics of standard compositions:
- Runs-resistance is A333628.
Classes of standard compositions:
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 16 2022
STATUS
approved