A222048 Sum of largest parts of all partitions of n into an even number of parts.
0, 0, 1, 2, 6, 9, 18, 26, 45, 62, 99, 135, 204, 274, 396, 527, 741, 973, 1333, 1736, 2331, 3007, 3970, 5079, 6615, 8393, 10796, 13605, 17320, 21673, 27339, 34001, 42540, 52597, 65324, 80332, 99127, 121274, 148745, 181131, 220956, 267852, 325114, 392476, 474178
Offset: 0
Keywords
Examples
a(6) = 18: partitions of 6 into an even number of parts are [1,1,1,1,1,1], [2,2,1,1], [3,1,1,1], [3,3], [4,2], [5,1], sum of largest parts is 1+2+3+3+4+5 = 18.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
Programs
-
Maple
b:= proc(n, i) option remember; [`if`(n=i, n, 0), 0]+ `if`(i>n, [0, 0], b(n, i+1)+(l-> [l[2], l[1]])(b(n-i, i))) end: a:= n-> b(n,1)[2]: seq(a(n), n=0..50);
-
Mathematica
b[n_, i_] := b[n, i] = {If[n==i, n, 0], 0} + If[i>n, {0, 0}, b[n, i+1] + Reverse @ b[n-i, i]]; a[n_] := b[n, 1][[2]]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Feb 02 2017, translated from Maple *)
Comments