OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
FORMULA
EXAMPLE
a(5)=10 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 sum of the smallest parts is 5+2+1+1+1=10.
MAPLE
g:=sum(x^j*product(1+x^i, i=1..j-1)/(1-x^j)^2, j=1..70): gser:=series(g, x=0, 65): seq(coeff(gser, x, n), n=1..60);
# second Maple program:
b:= proc(n, k, i) option remember; `if`(n<0, 0, `if`(n=0, 1,
`if`(i<k, 0, b(n, k, i-1)+`if`(i>n, 0, b(n-i, k, i)))))
end:
T:= (n, k)-> add(b(n-(i+k)*(i+1-k)/2, k, i), i=k..n):
a:= n-> add(T(n, k)*k, k=1..n):
seq(a(n), n=1..60); # Alois P. Heinz, Jun 04 2015
MATHEMATICA
b[n_, k_, i_] := b[n, k, i] = If[n<0, 0, If[n == 0, 1, If[i<k, 0, b[n, k, i-1] + If[i>n, 0, b[n-i, k, i]]]]]; T[n_, k_] := Sum[b[n-(i+k)*(i+1-k)/2, k, i], {i, k, n}]; a[n_] := Sum[T[n, k]*k, {k, 1, n}]; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Jun 29 2015, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Mar 19 2006
STATUS
approved