A207035 Sum of all parts minus the total number of parts of the last section of the set of partitions of n.
0, 1, 2, 5, 7, 16, 20, 39, 52, 86, 113, 184, 232, 353, 462, 661, 851, 1202, 1526, 2098, 2670, 3565, 4514, 5967, 7473, 9715, 12162, 15583, 19373, 24625, 30410, 38274, 47112, 58725, 71951, 89129, 108599, 133612, 162259, 198346, 239825, 291718, 351269, 425102
Offset: 1
Keywords
Examples
For n = 7 the last section of the set of partitions of 7 looks like this: . . (. . . . . . 7) . (. . . 4 . . 3) . (. . . . 5 . 2) . (. . 3 . 2 . 2) . (1) . (1) . (1) . (1) . (1) . (1) . (1) . (1) . (1) . (1) . (1) . The sum of all parts = 7+4+3+5+2+3+2+2+1*11 = 39, on the other hand the total number of parts is 1+2+2+3+1*11 = 19, so a(7) = 39 - 19 = 20. Note that the number of dots in the picture is also equal to a(7) = 6+5+5+4 = 20.
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..1000
Crossrefs
Programs
-
Maple
b:= proc(n, i) option remember; local f, g; if n=0 then [1, 0] elif i<2 then [0, 0] elif i>n then b(n, i-1) else f:= b(n, i-1); g:= b(n-i, i); [f[1]+g[1], f[2]+g[2] +g[1]*(i-1)] fi end: a:= n-> b(n, n)[2]: seq (a(n), n=1..50); # Alois P. Heinz, Feb 20 2012
-
Mathematica
b[n_, i_] := b[n, i] = Module[{f, g}, Which[n==0, {1, 0}, i<2, {0, 0}, i>n , b[n, i-1], True, f = b[n, i-1]; g = b[n-i, i]; {f[[1]] + g[[1]], f[[2]] + g[[2]] + g[[1]]*(i-1)}]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Sep 13 2015, after Alois P. Heinz *)
Formula
G.f.: Sum_{k>=1} x^(2*k)/(1 - x^k)^2 / Product_{j>=2} (1 - x^j). - Ilya Gutkovskiy, Mar 05 2021
Extensions
More terms from Alois P. Heinz, Feb 20 2012