OFFSET
1,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.
The complement starts: 14, 26, 28, 29, 30, 44, 46, 50, ...
EXAMPLE
The sequence together with the corresponding compositions begins:
0: () 17: (4,1) 37: (3,2,1)
1: (1) 18: (3,2) 38: (3,1,2)
2: (2) 19: (3,1,1) 39: (3,1,1,1)
3: (1,1) 20: (2,3) 40: (2,4)
4: (3) 21: (2,2,1) 41: (2,3,1)
5: (2,1) 22: (2,1,2) 42: (2,2,2)
6: (1,2) 23: (2,1,1,1) 43: (2,2,1,1)
7: (1,1,1) 24: (1,4) 45: (2,1,2,1)
8: (4) 25: (1,3,1) 47: (2,1,1,1,1)
9: (3,1) 27: (1,2,1,1) 48: (1,5)
10: (2,2) 31: (1,1,1,1,1) 49: (1,4,1)
11: (2,1,1) 32: (6) 51: (1,3,1,1)
12: (1,3) 33: (5,1) 55: (1,2,1,1,1)
13: (1,2,1) 34: (4,2) 63: (1,1,1,1,1,1)
15: (1,1,1,1) 35: (4,1,1) 64: (7)
16: (5) 36: (3,3) 65: (6,1)
For example, (2,3,1,2) is such a composition because the non-adjacent pairs are (2,1), (2,2), (3,2), all of which are weakly decreasing, so 166 is in the sequence
MATHEMATICA
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Select[Range[0, 100], !MatchQ[stc[#], {___, x_, __, y_, ___}/; y>x]&]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 18 2020
STATUS
approved