OFFSET
1,2
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.
LINKS
EXAMPLE
The sequence together with the corresponding compositions begins:
1: (1) 20: (2,3) 48: (1,5)
2: (2) 23: (2,1,1,1) 49: (1,4,1)
3: (1,1) 24: (1,4) 50: (1,3,2)
4: (3) 25: (1,3,1) 51: (1,3,1,1)
5: (2,1) 27: (1,2,1,1) 52: (1,2,3)
6: (1,2) 28: (1,1,3) 55: (1,2,1,1,1)
7: (1,1,1) 29: (1,1,2,1) 56: (1,1,4)
8: (4) 30: (1,1,1,2) 57: (1,1,3,1)
9: (3,1) 31: (1,1,1,1,1) 59: (1,1,2,1,1)
11: (2,1,1) 32: (6) 60: (1,1,1,3)
12: (1,3) 33: (5,1) 61: (1,1,1,2,1)
13: (1,2,1) 35: (4,1,1) 62: (1,1,1,1,2)
14: (1,1,2) 37: (3,2,1) 63: (1,1,1,1,1,1)
15: (1,1,1,1) 38: (3,1,2) 64: (7)
16: (5) 39: (3,1,1,1) 65: (6,1)
17: (4,1) 41: (2,3,1) 66: (5,2)
18: (3,2) 44: (2,1,3) 67: (5,1,1)
19: (3,1,1) 47: (2,1,1,1,1) 68: (4,3)
MATHEMATICA
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Select[Range[0, 100], Length[stc[#]]==1||CoprimeQ@@stc[#]&]
CROSSREFS
The version for binary indices is A087087.
The version counting compositions is A101268.
The version for prime indices is A302569.
The case without singletons is A333227.
The complement is A335236.
Numbers whose binary indices are pairwise coprime are A326675.
Coprime partitions are counted by A327516.
All of the following pertain to compositions in standard order:
- Length is A000120.
- The parts are row k of A066099.
- Sum is A070939.
- Product is A124758.
- Reverse is A228351
- GCD is A326674.
- Heinz number is A333219.
- LCM is A333226.
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 28 2020
STATUS
approved