OFFSET
0,3
FORMULA
G.f.: A(x) = d/dy A(x,y)|_{y = 1}, where A(x,y) = Sum_{i>0} (x^i * y^(i*(i+1)/2)) + Sum_{m>1} (Sum_{i>0} (x^m * y^i * ((x-x^m)/(1-x))^(i-1) * (Sum_{j>=0} (Product_{u=1..j} ((x-x^m)/(1-x) + x^m * y^(u+i)) ) ) ) ).
EXAMPLE
The composition of 7, (1,2,1,1,2) has maximum parts at positions 2 and 5; so it contributes 7 to a(7) = 240.
PROG
(PARI)
A_xy(N) = {my(x='x+O('x^N), h = sum(i=1, N, y^(i*(i+1)/2)*x^i)+sum(m=2, N, sum(i=1, N, ((y^i)*x^m)*((x-x^m)/(1-x))^(i-1)*(sum(j=0, N-m-i, prod(u=1, j, (x-x^m)/(1-x)+(y^(u+i))*x^m)))))); h}
P_xy(N) = Pol(A_xy(N), {x})
A_x(N) = {my(px = deriv(P_xy(N), y), y=1); Vecrev(eval(px))}
A_x(20)
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
John Tyler Rascoe, Nov 08 2024
STATUS
approved