login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of compositions of n whose Lyndon factorization is uniform.
2

%I #11 Feb 03 2022 21:33:47

%S 1,2,4,7,12,20,33,55,92,156,267,466,822,1473,2668,4886,9021,16786,

%T 31413,59101,111654,211722,402697,768025,1468170,2812471,5397602,

%U 10376418,19978238,38519537,74365161,143742338,278156642,538831403,1044830113,2027879831

%N Number of compositions of n whose Lyndon factorization is uniform.

%C We define the Lyndon product of two or more finite sequences to be the lexicographically maximal sequence obtainable by shuffling the sequences together. For example, the Lyndon product of (231) with (213) is (232131), the product of (221) with (213) is (222131), and the product of (122) with (2121) is (2122121). A Lyndon word is a finite sequence that is prime with respect to the Lyndon product. Equivalently, a Lyndon word is a finite sequence that is lexicographically strictly less than all of its cyclic rotations. Every finite sequence has a unique (orderless) factorization into Lyndon words, and if these factors are arranged in lexicographically decreasing order, their concatenation is equal to their Lyndon product. For example, (1001) has sorted Lyndon factorization (001)(1).

%C A sequence of words is uniform if they all have the same length.

%H Andrew Howroyd, <a href="/A329397/b329397.txt">Table of n, a(n) for n = 1..1000</a>

%F G.f.: Sum_{r>=1} (exp(Sum_{k>=1} B(r, x^k)/k) - 1) where B(r, x) = (Sum_{d|r} mu(d)/(1 - x^d)^(r/d))*x^r/r. - _Andrew Howroyd_, Feb 03 2022

%e The a(1) = 1 through a(6) = 20 Lyndon factorizations:

%e (1) (2) (3) (4) (5) (6)

%e (1)(1) (12) (13) (14) (15)

%e (2)(1) (112) (23) (24)

%e (1)(1)(1) (2)(2) (113) (114)

%e (3)(1) (122) (123)

%e (2)(1)(1) (1112) (132)

%e (1)(1)(1)(1) (3)(2) (1113)

%e (4)(1) (1122)

%e (2)(2)(1) (3)(3)

%e (3)(1)(1) (4)(2)

%e (2)(1)(1)(1) (5)(1)

%e (1)(1)(1)(1)(1) (11112)

%e (12)(12)

%e (2)(2)(2)

%e (3)(2)(1)

%e (4)(1)(1)

%e (2)(2)(1)(1)

%e (3)(1)(1)(1)

%e (2)(1)(1)(1)(1)

%e (1)(1)(1)(1)(1)(1)

%t lynQ[q_]:=Array[Union[{q,RotateRight[q,#]}]=={q,RotateRight[q,#]}&,Length[q]-1,1,And];

%t lynfac[q_]:=If[Length[q]==0,{},Function[i,Prepend[lynfac[Drop[q,i]],Take[q,i]]][Last[Select[Range[Length[q]],lynQ[Take[q,#]]&]]]];

%t Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],SameQ@@Length/@lynfac[#]&]],{n,10}]

%o (PARI) EulerT(v)={Vec(exp(x*Ser(dirmul(v,vector(#v,n,1/n))))-1, -#v)}

%o B(n,k) = {sumdiv(n, d, moebius(d)/(1-x^d)^(n/d) + O(x*x^k))/n}

%o seq(n) = {sum(d=1, n-1, my(v=Vec(B(d,n-d),-n)); EulerT(v))} \\ _Andrew Howroyd_, Feb 03 2022

%Y Lyndon and co-Lyndon compositions are (both) counted by A059966.

%Y Lyndon compositions that are not weakly increasing are A329141.

%Y Lyndon compositions whose reverse is not co-Lyndon are A329324.

%Y Cf. A000740, A001037, A008965, A060223, A102659, A211100, A275692, A328596, A329312, A329318, A329395, A329396, A329398, A329399.

%K nonn

%O 1,2

%A _Gus Wiseman_, Nov 13 2019

%E a(19)-a(25) from _Robert Price_, Jun 20 2021

%E Terms a(26) and beyond from _Andrew Howroyd_, Feb 03 2022