login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A339011
Sum over all partitions of n of the product of the number of parts and the number of distinct parts.
4
0, 1, 3, 8, 17, 34, 61, 107, 176, 284, 442, 676, 1007, 1483, 2140, 3055, 4299, 5993, 8255, 11284, 15272, 20529, 27373, 36274, 47735, 62484, 81293, 105251, 135555, 173818, 221836, 282003, 356980, 450256, 565765, 708537, 884296, 1100287, 1364736, 1687952, 2081724
OFFSET
0,3
LINKS
MAPLE
b:= proc(n, i, p, d) option remember; `if`(n=0, d*p, `if`(i<1, 0,
add(b(n-i*j, i-1, p+j, `if`(j=0, d, d+1)), j=0..n/i)))
end:
a:= n-> b(n$2, 0$2):
seq(a(n), n=0..50);
# second Maple program:
b:= proc(n, i) option remember; `if`(n<=0 or i=0, [0$2],
`if`(i=1, [1, n], b(n, i-1)+ (p-> p+[0, p[1]])(b(n-i, i))))
end:
a:= proc(n) option remember; b(n$2)[2]+`if`(n<0, 0, a(n-1)) end:
seq(a(n), n=0..100); # Alois P. Heinz, Jul 25 2022
MATHEMATICA
b[n_, i_, p_, d_] := b[n, i, p, d] = If[n == 0, d*p, If[i < 1, 0,
Sum[b[n - i*j, i - 1, p + j, If[j == 0, d, d + 1]], {j, 0, n/i}]]];
a[n_] := b[n, n, 0, 0];
a /@ Range[0, 50] (* Jean-François Alcover, Mar 09 2021, after Alois P. Heinz *)
CROSSREFS
Essentially partial sums of A093694.
Sequence in context: A281166 A165273 A002626 * A029859 A344004 A305105
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Nov 18 2020
STATUS
approved