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


(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A334270 Number of sequences of length n that cover an initial interval of positive integers and are both a reversed Lyndon word and a co-Lyndon word. 6
1, 1, 1, 3, 10, 42, 224, 1505, 12380, 120439 (list; graph; refs; listen; history; text; internal format)



Also the number of sequences of length n that cover an initial interval of positive integers and are both a Lyndon word and a reversed 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.


Table of n, a(n) for n=0..9.


The a(1) = 1 through a(4) = 10 normal sequences:

(1) (2,1) (2,1,1) (2,1,1,1)

(2,2,1) (2,2,1,1)

(3,2,1) (2,2,2,1)









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];

allnorm[n_]:=If[n<=0, {{}}, Function[s, Array[Count[s, y_/; y<=#]+1&, n]]/@Subsets[Range[n-1]+1]];

Table[Length[Select[Join@@Permutations/@allnorm[n], lynQ[Reverse[#]]&&colynQ[#]&]], {n, 0, 6}]


These compositions are ranked by A334266 (standard) and A334267 (binary).

Compositions of this type are counted by A334269.

Necklace compositions of this type are counted by A334271.

Dominated by A334272 (the necklace version).

Normal sequences are counted by A000670.

Binary (or reversed binary) Lyndon words are counted by A001037.

Lyndon compositions are counted by A059966.

Normal Lyndon words are counted by A060223.

Normal sequences by length and Lyndon factorization length are A296372.

All of the following pertain to compositions in standard order (A066099):

- Lyndon words are A275692.

- Co-Lyndon words are A326774.

- Reversed Lyndon words are A334265.

- Reversed co-Lyndon words are A328596.

- Length of Lyndon factorization is A329312.

- Length of co-Lyndon factorization is A334029.

- Length of Lyndon factorization of reverse is A334297.

- Length of co-Lyndon factorization of reverse is A329313.

Cf. A008965, A034691, A329324, A329398, A334273.

Sequence in context: A352856 A007680 A232606 * A185621 A190657 A143523

Adjacent sequences: A334267 A334268 A334269 * A334271 A334272 A334273




Gus Wiseman, Apr 24 2020



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 February 5 03:20 EST 2023. Contains 360082 sequences. (Running on oeis4.)