|
|
A207381
|
|
Total sum of the odd-indexed parts of all partitions of n.
|
|
4
|
|
|
1, 3, 7, 14, 25, 45, 72, 117, 180, 275, 403, 596, 846, 1206, 1681, 2335, 3183, 4342, 5820, 7799, 10321, 13622, 17798, 23221, 30009, 38706, 49567, 63316, 80366, 101805, 128211, 161134, 201537, 251495, 312508, 387535, 478674, 590072, 724920, 888795, 1086324
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
For n = 5, write the partitions of 5 and below write the sums of their odd-indexed parts:
. 5
. 3+2
. 4+1
. 2+2+1
. 3+1+1
. 2+1+1+1
. 1+1+1+1+1
. ------------
. 20 + 4 + 1 = 25
The total sum of the odd-indexed parts is 25 so a(5) = 25.
|
|
MAPLE
|
b:= proc(n, i) option remember; local g, h;
if n=0 then [1, 0$2]
elif i<1 then [0$3]
else g:= b(n, i-1); h:= `if`(i>n, [0$3], b(n-i, i));
[g[1]+h[1], g[2]+h[3], g[3]+h[2]+i*h[1]]
fi
end:
a:= n-> b(n, n)[3]:
|
|
MATHEMATICA
|
b[n_, i_] := b[n, i] = Module[{g, h}, If[n == 0 , {1, 0, 0}, If[i < 1, {0, 0, 0}, g = b[n, i - 1]; h = If[i > n, {0, 0, 0}, b[n - i, i]]; {g[[1]] + h[[1]], g[[2]] + h[[3]], g[[3]] + h[[2]] + i*h[[1]]}]]]; a[n_] := b[n, n][[3]]; Table [a[n], {n, 1, 50}] (* Jean-François Alcover, Dec 09 2016 after Alois P. Heinz *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|