OFFSET
1,4
COMMENTS
a(n) = sum(k*A117454(n,k), k=0..n-2).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
FORMULA
G.f.: sum(x^(i(i+1)/2)*sum(1/(1-x^j), j=1..i-1)/product(1-x^j, j=1..i), i=1..infinity) (obtained by taking the derivative with respect to t of the g.f. G(t,x) of A117454 and letting t=1).
EXAMPLE
a(7)=12 because the partitions of 7 into distinct parts are [7], [6,1], [5,2], [4,3] and [4,2,1] and (7-7)+(6-1)+(5-2)+(4-3)+(4-1)=12.
MAPLE
g:=sum(x^(i*(i+1)/2)*sum(1/(1-x^j), j=1..i-1)/product(1-x^j, j=1..i), i=1..15): gser:=series(g, x=0, 55): seq(coeff(gser, x^n), n=1..50);
# second Maple program:
b:= proc(n, i) option remember;
`if`(i=n, n, 0)+`if`(i>0, b(n, i-1)+
`if`(i<n, b(n-i, i-1), 0), 0)
end:
g:= proc(n, i) option remember;
`if`(i=n, n, 0)+`if`(i<n, g(n, i+1)+g(n-i, i+1), 0)
end:
a:= n-> g(n, 1) -b(n, n):
seq(a(n), n=1..60); # Alois P. Heinz, Jul 06 2012
MATHEMATICA
b[n_, i_] := b[n, i] = If[i==n, n, 0] + If[i>0, b[n, i-1] + If[i<n, b[n-i, i-1], 0], 0]; g[n_, i_] := g[n, i] = If[i==n, n, 0] + If[i<n, g[n, i+1] + g[n-i, i+1], 0]; a[n_] := g[n, 1] - b[n, n]; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Mar 24 2015, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Mar 18 2006
STATUS
approved