|
|
A117457
|
|
Number of parts in all partitions of n in which every integer from the smallest part to the largest part occurs as a part.
|
|
2
|
|
|
1, 3, 6, 10, 15, 24, 32, 45, 63, 82, 107, 144, 179, 228, 296, 362, 450, 564, 684, 839, 1029, 1232, 1487, 1799, 2141, 2546, 3044, 3589, 4237, 5015, 5863, 6869, 8051, 9361, 10904, 12677, 14657, 16948, 19595, 22552, 25927, 29812, 34130, 39066, 44703, 50955, 58070
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
a(n) = Sum_{k=1..n} k * A117456(n,k).
G.f.: Sum_{j >= 1} (j*x^j*(Product_{i=1..j-1} (1+x^i))/(1-x^j)) (obtained by taking the derivative with respect to t of the g.f. G(t,x) of A117456 and setting t=1).
|
|
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):
|
|
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}];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|