A182094 Total area of the bounding boxes of all integer partitions of n.
0, 1, 4, 10, 24, 47, 93, 162, 283, 462, 747, 1154, 1779, 2642, 3908, 5643, 8098, 11398, 15975, 22030, 30253, 41027, 55379, 73983, 98455, 129838, 170578, 222447, 289009, 373064, 479970, 613962, 782893, 993349, 1256546, 1582466, 1987365, 2485840, 3101146
Offset: 0
Keywords
Examples
a(4) = 24 = 4+6+4+6+4 because the partitions of 4 are [1,1,1,1], [1,1,2], [2,2], [1,3], [4] and the bounding boxes have areas 4*1, 3*2, 2*2, 2*3, 1*4. a(5) = 47 = 5+8+6+9+6+8+5 because the partitions of 5 are [1,1,1,1,1], [1,1,1,2], [1,2,2], [1,1,3], [2,3], [1,4], [5].
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
Programs
-
Maple
b:= proc(n, i) option remember; local f, g; if n=0 or i=1 then [1, n] elif i<1 then [0, 0] else f:= b(n, i-1); g:= `if`(i>n, [0, 0], b(n-i, i)); [f[1]+g[1], f[2]+g[2]+g[1]] fi end: a:= n-> add(add(i, i=b(n-j, min(j, n-j)))*j, j=1..n): seq(a(n), n=0..40);
-
Mathematica
b[n_, i_] := b[n, i] = Module[{f, g}, If[n == 0 || i == 1, {1, n}, If[i < 1, {0, 0}, f = b[n, i - 1]; g = If[i > n, {0, 0}, b[n - i, i]]]; {f[[1]] + g[[1]], f[[2]] + g[[2]] + g[[1]]}]]; a[n_] := Sum[Sum[i, {i, b[n - j, Min[j, n - j]]}]*j, {j, 1, n}]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 05 2017, translated from Maple *)