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”).

A329397
Number of compositions of n whose Lyndon factorization is uniform.
2
1, 2, 4, 7, 12, 20, 33, 55, 92, 156, 267, 466, 822, 1473, 2668, 4886, 9021, 16786, 31413, 59101, 111654, 211722, 402697, 768025, 1468170, 2812471, 5397602, 10376418, 19978238, 38519537, 74365161, 143742338, 278156642, 538831403, 1044830113, 2027879831
OFFSET
1,2
COMMENTS
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).
A sequence of words is uniform if they all have the same length.
LINKS
FORMULA
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
EXAMPLE
The a(1) = 1 through a(6) = 20 Lyndon factorizations:
(1) (2) (3) (4) (5) (6)
(1)(1) (12) (13) (14) (15)
(2)(1) (112) (23) (24)
(1)(1)(1) (2)(2) (113) (114)
(3)(1) (122) (123)
(2)(1)(1) (1112) (132)
(1)(1)(1)(1) (3)(2) (1113)
(4)(1) (1122)
(2)(2)(1) (3)(3)
(3)(1)(1) (4)(2)
(2)(1)(1)(1) (5)(1)
(1)(1)(1)(1)(1) (11112)
(12)(12)
(2)(2)(2)
(3)(2)(1)
(4)(1)(1)
(2)(2)(1)(1)
(3)(1)(1)(1)
(2)(1)(1)(1)(1)
(1)(1)(1)(1)(1)(1)
MATHEMATICA
lynQ[q_]:=Array[Union[{q, RotateRight[q, #]}]=={q, RotateRight[q, #]}&, Length[q]-1, 1, And];
lynfac[q_]:=If[Length[q]==0, {}, Function[i, Prepend[lynfac[Drop[q, i]], Take[q, i]]][Last[Select[Range[Length[q]], lynQ[Take[q, #]]&]]]];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], SameQ@@Length/@lynfac[#]&]], {n, 10}]
PROG
(PARI) EulerT(v)={Vec(exp(x*Ser(dirmul(v, vector(#v, n, 1/n))))-1, -#v)}
B(n, k) = {sumdiv(n, d, moebius(d)/(1-x^d)^(n/d) + O(x*x^k))/n}
seq(n) = {sum(d=1, n-1, my(v=Vec(B(d, n-d), -n)); EulerT(v))} \\ Andrew Howroyd, Feb 03 2022
CROSSREFS
Lyndon and co-Lyndon compositions are (both) counted by A059966.
Lyndon compositions that are not weakly increasing are A329141.
Lyndon compositions whose reverse is not co-Lyndon are A329324.
Sequence in context: A179111 A093607 A005182 * A172524 A094925 A289168
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 13 2019
EXTENSIONS
a(19)-a(25) from Robert Price, Jun 20 2021
Terms a(26) and beyond from Andrew Howroyd, Feb 03 2022
STATUS
approved