OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
EXAMPLE
The partitions of n=4 are [1,1,1,1], [2,1,1], [2,2], [3,1], [4]. Parts <= 4 with multiplicity m=0 sum up to (2+3+4)+(3+4)+(1+3+4)+(2+4)+(1+2+3) = 36, thus a(4) = 36.
MAPLE
b:= proc(n, p) option remember; `if`(n=0 and p=0, [1, 0], `if`(p<1, [0$2],
add((l->`if`(m=0, l+[0, l[1]*p], l))(b(n-p*m, p-1)), m=0..n/p)))
end:
a:= n-> b(n, n)[2]:
seq(a(n), n=0..55);
MATHEMATICA
b[n_, p_] := b[n, p] = If[n == 0 && p == 0, {1, 0}, If[p == 0, Array[0&, n+2], Sum[Function[l, ReplacePart[l, m+2 -> p*l[[1]] + l[[m+2]]]][Join[b[n-p*m, p-1], Array[0&, p*m]]], {m, 0, n/p}]]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 0, 55}] (* Jean-François Alcover, Jan 24 2014, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Mar 04 2013
STATUS
approved