A329397 Number of compositions of n whose Lyndon factorization is uniform.
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
Keywords
Examples
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)
Links
- Andrew Howroyd, Table of n, a(n) for n = 1..1000
Crossrefs
Programs
-
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}]
-
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
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
Extensions
a(19)-a(25) from Robert Price, Jun 20 2021
Terms a(26) and beyond from Andrew Howroyd, Feb 03 2022
Comments