OFFSET
1,2
LINKS
Vaclav Kotesovec, Table of n, a(n) for n = 1..20000 (terms 1..5000 from Alois P. Heinz)
FORMULA
EXAMPLE
a(5) = 15 because in the 5 (=A034296(5)) partitions in which every integer from the smallest to the largest part occurs, namely [5], [3,2], [2,2,1],[2,1,1,1] and [1,1,1,1,1], the total number of parts is 1+2+3+4+5 = 15.
MAPLE
g:=sum(j*x^j*product(1+x^i, i=1..j-1)/(1-x^j), j=1..60): gser:=series(g, x=0, 55): seq(coeff(gser, x^n), n=1..50);
# second Maple program:
b:= proc(n, i) option remember; `if`(n=0, [1, 0], `if`(i<1, 0,
add((p-> p+[0, p[1]*j])(b(n-i*j, i-1)), j=1..n/i)))
end:
a:= n-> add(b(n, k)[2], k=0..n):
seq(a(n), n=1..50); # Alois P. Heinz, Oct 09 2020
MATHEMATICA
b[n_, i_] := b[n, i] = Module[{p}, If[n==0, {1, 0}, If[i<1, {0, 0}, Sum[p = b[n - i j, i-1]; If[p === 0, {0, 0}, p + {0, p[[1]] j}], {j, 1, n/i}]]]];
a[n_] := Sum[b[n, k][[2]], {k, 0, n}];
Array[a, 50] (* Jean-François Alcover, Dec 04 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Mar 18 2006
STATUS
approved