OFFSET
0,6
COMMENTS
A composition of n is a finite sequence of positive integers summing to n. 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 a(299) = 5 rotations:
(1,1,3,2,2)
(1,3,2,2,1)
(3,2,2,1,1)
(2,2,1,1,3)
(2,1,1,3,2)
The a(9933) = 4 rotations:
(1,2,1,3,1,2,1,3)
(1,3,1,2,1,3,1,2)
(2,1,3,1,2,1,3,1)
(3,1,2,1,3,1,2,1)
MATHEMATICA
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Table[Length[Union[Array[RotateRight[stc[n], #]&, DigitCount[n, 2, 1]]]], {n, 0, 100}]
CROSSREFS
Aperiodic compositions are counted by A000740.
Aperiodic binary words are counted by A027375.
The orderless period of prime indices is A052409.
Numbers whose binary expansion is periodic are A121016.
Periodic compositions are counted by A178472.
The version for binary expansion is A302291.
Numbers whose prime signature is aperiodic are A329139.
Compositions by number of distinct rotations are A333941.
All of the following pertain to compositions in standard order (A066099):
- Length is A000120.
- Necklaces are A065609.
- Sum is A070939.
- Equal runs are counted by A124767.
- Rotational symmetries are counted by A138904.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Lyndon compositions are A275692.
- Co-Lyndon compositions are A326774.
- Aperiodic compositions are A328594.
- Rotational period is A333632 (this sequence).
- Co-necklaces are A333764.
- Reversed necklaces are A333943.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Apr 12 2020
STATUS
approved