%I #10 Apr 26 2020 09:10:45
%S 1,1,2,3,6,8,16,23,40,62,110,169,302,492,856,1454,2572,4428,7914,
%T 13935,25036,44842,81298,147149,268952,491746,904594,1667091,3085950,
%U 5723367,10652544,19865887,37150314,69608939,130723184,245935633,463590444,875306913,1655451592,3135613649,5948011978,11298215516
%N Number of compositions of n that are both a reversed Lyndon word and a co-Lyndon word.
%C Also the number of compositions of n that are both a Lyndon word and a reversed co-Lyndon word.
%C A composition of n is a finite sequence of positive integers summing to n.
%C 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.
%e The a(1) = 1 through a(7) = 16 compositions:
%e (1) (2) (3) (4) (5) (6) (7)
%e (21) (31) (32) (42) (43)
%e (211) (41) (51) (52)
%e (221) (321) (61)
%e (311) (411) (322)
%e (2111) (2211) (331)
%e (3111) (421)
%e (21111) (511)
%e (2221)
%e (3121)
%e (3211)
%e (4111)
%e (21211)
%e (22111)
%e (31111)
%e (211111)
%t lynQ[q_]:=Length[q]==0||Array[Union[{q,RotateRight[q,#1]}]=={q,RotateRight[q,#1]}&,Length[q]-1,1,And];
%t colynQ[q_]:=Length[q]==0||Array[Union[{RotateRight[q,#],q}]=={RotateRight[q,#],q}&,Length[q]-1,1,And];
%t Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],lynQ[Reverse[#]]&&colynQ[#]&]],{n,0,15}]
%Y The version for binary expansion is A334267.
%Y Compositions of this type are ranked by A334266.
%Y Normal sequences of this type are counted by A334270.
%Y Necklace compositions of this type are counted by A334271.
%Y Aperiodic compositions are counted by A000740.
%Y Binary Lyndon words are counted by A001037.
%Y Necklace compositions are counted by A008965.
%Y Normal Lyndon words are counted by A060223.
%Y Lyndon compositions are counted by A059966.
%Y All of the following pertain to compositions in standard order (A066099):
%Y - Lyndon words are A275692.
%Y - Co-Lyndon words are A326774.
%Y - Reversed Lyndon words are A334265.
%Y - Reversed co-Lyndon words are A328596.
%Y - Length of Lyndon factorization is A329312.
%Y - Length of co-Lyndon factorization is A334029.
%Y - Length of Lyndon factorization of reverse is A334297.
%Y - Length of co-Lyndon factorization of reverse is A329313.
%Y - Lyndon factorizations are counted by A333940.
%Y - Co-Lyndon factorizations are counted by A333765.
%Y - Aperiodic compositions are A328594.
%Y - Distinct rotations are counted by A333632.
%Y Cf. A034691, A065609, A275692, A328596, A329141, A329324, A329326, A334266, A334272, A334273, A334274.
%K nonn
%O 1,3
%A _Gus Wiseman_, Apr 24 2020
%E Offset corrected and a(21)-a(42) from _Bert Dobbelaere_, Apr 26 2020