login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A334267 Numbers k such that the k-th composition in standard order is both a Lyndon word and a reversed co-Lyndon word. 6
0, 1, 2, 4, 6, 8, 12, 14, 16, 20, 24, 26, 28, 30, 32, 40, 48, 52, 56, 58, 60, 62, 64, 72, 80, 84, 96, 100, 104, 106, 108, 112, 116, 118, 120, 122, 124, 126, 128, 144, 160, 164, 168, 192, 200, 208, 212, 216, 218, 224, 228, 232, 234, 236, 240, 244, 246, 248, 250 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Also numbers whose binary expansion is both a reversed Lyndon word and a co-Lyndon word.
A Lyndon word is a finite sequence of positive integers that is lexicographically strictly less than all of its cyclic rotations. Co-Lyndon is defined similarly, except with strictly greater instead of strictly less.
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
FORMULA
Intersection of A275692 and A328596.
EXAMPLE
The sequence of all reversed co-Lyndon Lyndon words begins:
0: () 56: (1,1,4) 124: (1,1,1,1,3)
1: (1) 58: (1,1,2,2) 126: (1,1,1,1,1,2)
2: (2) 60: (1,1,1,3) 128: (8)
4: (3) 62: (1,1,1,1,2) 144: (3,5)
6: (1,2) 64: (7) 160: (2,6)
8: (4) 72: (3,4) 164: (2,3,3)
12: (1,3) 80: (2,5) 168: (2,2,4)
14: (1,1,2) 84: (2,2,3) 192: (1,7)
16: (5) 96: (1,6) 200: (1,3,4)
20: (2,3) 100: (1,3,3) 208: (1,2,5)
24: (1,4) 104: (1,2,4) 212: (1,2,2,3)
26: (1,2,2) 106: (1,2,2,2) 216: (1,2,1,4)
28: (1,1,3) 108: (1,2,1,3) 218: (1,2,1,2,2)
30: (1,1,1,2) 112: (1,1,5) 224: (1,1,6)
32: (6) 116: (1,1,2,3) 228: (1,1,3,3)
40: (2,4) 118: (1,1,2,1,2) 232: (1,1,2,4)
48: (1,5) 120: (1,1,1,4) 234: (1,1,2,2,2)
52: (1,2,3) 122: (1,1,1,2,2) 236: (1,1,2,1,3)
The sequence of terms together with their binary expansions and binary indices begins:
0: 0 ~ {} 56: 111000 ~ {4,5,6}
1: 1 ~ {1} 58: 111010 ~ {2,4,5,6}
2: 10 ~ {2} 60: 111100 ~ {3,4,5,6}
4: 100 ~ {3} 62: 111110 ~ {2,3,4,5,6}
6: 110 ~ {2,3} 64: 1000000 ~ {7}
8: 1000 ~ {4} 72: 1001000 ~ {4,7}
12: 1100 ~ {3,4} 80: 1010000 ~ {5,7}
14: 1110 ~ {2,3,4} 84: 1010100 ~ {3,5,7}
16: 10000 ~ {5} 96: 1100000 ~ {6,7}
20: 10100 ~ {3,5} 100: 1100100 ~ {3,6,7}
24: 11000 ~ {4,5} 104: 1101000 ~ {4,6,7}
26: 11010 ~ {2,4,5} 106: 1101010 ~ {2,4,6,7}
28: 11100 ~ {3,4,5} 108: 1101100 ~ {3,4,6,7}
30: 11110 ~ {2,3,4,5} 112: 1110000 ~ {5,6,7}
32: 100000 ~ {6} 116: 1110100 ~ {3,5,6,7}
40: 101000 ~ {4,6} 118: 1110110 ~ {2,3,5,6,7}
48: 110000 ~ {5,6} 120: 1111000 ~ {4,5,6,7}
52: 110100 ~ {3,5,6} 122: 1111010 ~ {2,4,5,6,7}
MATHEMATICA
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
lynQ[q_]:=Length[q]==0||Array[Union[{q, RotateRight[q, #1]}]=={q, RotateRight[q, #1]}&, Length[q]-1, 1, And];
colynQ[q_]:=Length[q]==0||Array[Union[{RotateRight[q, #], q}]=={RotateRight[q, #], q}&, Length[q]-1, 1, And];
Select[Range[0, 100], colynQ[Reverse[stc[#]]]&&lynQ[stc[#]]&]
CROSSREFS
Compositions of this type are counted by A334269.
Normal sequences of this type are counted by A334270.
Necklaces of this type are counted by A334271.
Necklaces of this type are ranked by A334274.
Binary (or reversed binary) Lyndon words are counted by A001037.
Lyndon compositions are counted by A059966.
Lyndon words whose reverse is not co-Lyndon are counted by A329324
Reversed Lyndon co-Lyndon compositions are ranked by A334266.
All of the following pertain to compositions in standard order (A066099):
- Length is A000120.
- Necklaces are A065609.
- Sum is A070939.
- Reverse is A228351 (triangle).
- Strict compositions are A233564.
- Constant compositions are A272919.
- Lyndon words are A275692.
- Reversed Lyndon words are A334265.
- Co-Lyndon words are A326774.
- Reversed co-Lyndon words are A328596.
- Length of Lyndon factorization is A329312.
- Length of Lyndon factorization of reverse is A334297.
- Length of co-Lyndon factorization is A334029.
- Length of co-Lyndon factorization of reverse is A329313.
- Distinct rotations are counted by A333632.
- Lyndon factorizations are counted by A333940.
- Co-Lyndon factorizations are counted by A333765.
Sequence in context: A091065 A328596 A275692 * A163823 A015929 A331994
KEYWORD
nonn
AUTHOR
Gus Wiseman, Apr 22 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 18:05 EDT 2024. Contains 371798 sequences. (Running on oeis4.)