

A334270


Number of sequences of length n that cover an initial interval of positive integers and are both a reversed Lyndon word and a coLyndon word.


6




OFFSET

0,4


COMMENTS

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 coLyndon word.
A Lyndon word is a finite sequence of positive integers that is lexicographically strictly less than all of its cyclic rotations. CoLyndon is defined similarly, except with strictly greater instead of strictly less.


LINKS

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


EXAMPLE

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)
(3,1,2,1)
(3,2,1,1)
(3,2,2,1)
(3,2,3,1)
(3,3,2,1)
(4,2,3,1)
(4,3,2,1)


MATHEMATICA

lynQ[q_]:=Length[q]==0Array[Union[{q, RotateRight[q, #1]}]=={q, RotateRight[q, #1]}&, Length[q]1, 1, And];
colynQ[q_]:=Length[q]==0Array[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[n1]+1]];
Table[Length[Select[Join@@Permutations/@allnorm[n], lynQ[Reverse[#]]&&colynQ[#]&]], {n, 0, 6}]


CROSSREFS

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.
 CoLyndon words are A326774.
 Reversed Lyndon words are A334265.
 Reversed coLyndon words are A328596.
 Length of Lyndon factorization is A329312.
 Length of coLyndon factorization is A334029.
 Length of Lyndon factorization of reverse is A334297.
 Length of coLyndon 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


KEYWORD

nonn,more


AUTHOR

Gus Wiseman, Apr 24 2020


STATUS

approved



