OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
FORMULA
G.f.: (1-x)^2 * Sum_{k>=1} k*x^k/(1 - 2*x + x^(k+1))^2.
EXAMPLE
a(3)=10 because in the compositions 111, 12, 21, 3 the largest parts are 1, 2, 2, 3 with multiplicities 3, 1, 1, 1, respectively and 3*1 + 1*2 + 1*2 + 1*3 = 10.
MAPLE
G:=(1-x)^2*sum(k*x^k/(1-2*x+x^(k+1))^2, k=1..45): Gser:=series(G, x=0, 40): seq(coeff(Gser, x^n), n=1..35); # Emeric Deutsch, Jul 28 2005
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Vladeta Jovovic, Sep 07 2004
EXTENSIONS
More terms from Emeric Deutsch, Jul 28 2005
STATUS
approved