A066185 Sum of the first moments of all partitions of n with weights starting at 0.
0, 0, 1, 4, 12, 26, 57, 103, 191, 320, 537, 843, 1342, 2015, 3048, 4457, 6509, 9250, 13170, 18316, 25483, 34853, 47556, 64017, 86063, 114285, 151462, 198871, 260426, 338275, 438437, 564131, 724202, 924108, 1176201, 1489237, 1881273, 2365079, 2966620, 3705799
Offset: 0
Examples
a(3)=4 because the first moments of all partitions of 3 are {3}.{0},{2,1}.{0,1} and {1,1,1}.{0,1,2}, resulting in 0,1,3; summing to 4.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..10000
Programs
-
Maple
b:= proc(n, i) option remember; `if`(n=0 or i=1, [1, 0], b(n, i-1)+(h-> h+[0, h[1]*i*(i-1)/2])(b(n-i, min(n-i, i)))) end: a:= n-> b(n$2)[2]: seq(a(n), n=0..50); # Alois P. Heinz, Jan 29 2014
-
Mathematica
Table[ Plus@@ Map[ #.Range[ 0, -1+Length[ # ] ]&, IntegerPartitions[ n ] ], {n, 40} ] b[n_, i_] := b[n, i] = If[n==0, {1, 0}, If[i<1, {0, 0}, If[i>n, b[n, i-1], b[n, i-1] + Function[h, h+{0, h[[1]]*i*(i-1)/2}][b[n-i, i]]]]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Oct 26 2015, after Alois P. Heinz *)
Formula
G.f.: Sum_{k>=1} x^(2*k)/(1 - x^k)^3 / Product_{j>=1} (1 - x^j). - Ilya Gutkovskiy, Mar 05 2021
a(n) ~ 3 * zeta(3) * sqrt(n) * exp(Pi*sqrt(2*n/3)) / (sqrt(2) * Pi^3). - Vaclav Kotesovec, Jul 06 2025
Comments