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.
EXAMPLE
The terms and corresponding compositions begin:
0: () 36: (3,3) 54: (1,2,1,2)
1: (1) 37: (3,2,1) 55: (1,2,1,1,1)
2: (2) 38: (3,1,2) 57: (1,1,3,1)
3: (1,1) 39: (3,1,1,1) 58: (1,1,2,2)
4: (3) 41: (2,3,1) 59: (1,1,2,1,1)
7: (1,1,1) 42: (2,2,2) 60: (1,1,1,3)
8: (4) 43: (2,2,1,1) 61: (1,1,1,2,1)
10: (2,2) 44: (2,1,3) 62: (1,1,1,1,2)
11: (2,1,1) 45: (2,1,2,1) 63: (1,1,1,1,1,1)
13: (1,2,1) 46: (2,1,1,2) 64: (7)
14: (1,1,2) 47: (2,1,1,1,1) 127: (1,1,1,1,1,1,1)
15: (1,1,1,1) 50: (1,3,2) 128: (8)
16: (5) 51: (1,3,1,1) 136: (4,4)
31: (1,1,1,1,1) 52: (1,2,3) 138: (4,2,2)
32: (6) 53: (1,2,2,1) 139: (4,2,1,1)
MATHEMATICA
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Select[Range[0, 100], #==0||Divisible[Total[stc[#]], LCM@@stc[#]]&]
CROSSREFS
Looking at length instead of parts gives A096199.
These composition are counted by A100346.
A version counting subsets instead of compositions is A125297.
A011782 counts compositions.
Statistics of standard compositions:
- The compositions themselves are the rows of A066099.
Classes of standard compositions:
- Permutations are ranked by A333218.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 15 2021
STATUS
approved