OFFSET
1,5
COMMENTS
a(n)=sum(k*A117470(n,k),k>=0).
FORMULA
G.f.=sum(x^j*product(1+x^i, i=1..j-1)sum(x^i/(1+x^i), i=1..j-1)/(1-x^j), j=1..infinity) (obtained by taking the derivative with respect to t of the g.f. G(t,x) of A117470 and setting t=1).
EXAMPLE
a(6)=4 because the 7 (=A034296(6) ) partitions of 6 in which every integer from the smallest part to the largest part occurs are [6],[3,3],[3,2,1],[2,2,2],[2,2,1,1],[2,1,1,1,1],[1,1,1,1,1,1] and (6-6)+(3-3)+(3-1)+(2-2)+(2-1)+(2-1)+(1-1)=4.
MAPLE
g:=sum(x^j*product(1+x^i, i=1..j-1)*sum(x^i/(1+x^i), i=1..j-1)/(1-x^j), j=1..65): gser:=series(g, x=0, 60): seq(coeff(gser, x, n), n=1..57);
MATHEMATICA
Table[Total[Max[#]-Min[#]&/@Select[IntegerPartitions[n], Max[Abs[ Differences[ #]]]<2&]], {n, 60}] (* Harvey P. Dale, Oct 14 2014 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Mar 20 2006
STATUS
approved