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.
FORMULA
EXAMPLE
The sequence together with the corresponding triples begins:
37: (3,2,1) 140: (4,1,3) 289: (3,5,1)
38: (3,1,2) 145: (3,4,1) 290: (3,4,2)
41: (2,3,1) 152: (3,1,4) 296: (3,2,4)
44: (2,1,3) 161: (2,5,1) 304: (3,1,5)
50: (1,3,2) 176: (2,1,5) 321: (2,6,1)
52: (1,2,3) 194: (1,5,2) 324: (2,4,3)
69: (4,2,1) 196: (1,4,3) 328: (2,3,4)
70: (4,1,2) 200: (1,3,4) 352: (2,1,6)
81: (2,4,1) 208: (1,2,5) 386: (1,6,2)
88: (2,1,4) 261: (6,2,1) 388: (1,5,3)
98: (1,4,2) 262: (6,1,2) 400: (1,3,5)
104: (1,2,4) 265: (5,3,1) 416: (1,2,6)
133: (5,2,1) 268: (5,1,3) 517: (7,2,1)
134: (5,1,2) 274: (4,3,2) 518: (7,1,2)
137: (4,3,1) 276: (4,2,3) 521: (6,3,1)
MATHEMATICA
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Select[Range[0, 100], Length[stc[#]]==3&&UnsameQ@@stc[#]&]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 07 2020
STATUS
approved