%I #67 Oct 02 2022 00:35:09
%S 0,1,3,8,15,31,51,90,142,228,341,525,757,1110,1572,2233,3084,4286,
%T 5812,7910,10580,14145,18659,24626,32099,41814,53976,69559,88932,
%U 113557,143967,182241,229353,288078,360029,449158,557757,691369,853628,1051974
%N Sum of all parts minus the total numbers of parts of all partitions of n.
%C Also sum of parts of all partitions of n except the largest parts of the partitions. - _Omar E. Pol_, Feb 16 2012
%C Equals column 1 of A161224. - _Omar E. Pol_, Feb 26 2012
%C Partial sums of A207035. - _Omar E. Pol_, Apr 22 2012
%H Alois P. Heinz, <a href="/A196087/b196087.txt">Table of n, a(n) for n = 1..1000</a>
%F a(n) = n*A000041(n) - A006128(n) = A066186(n) - A006128(n).
%F a(n) = A207038(A000041(n)). - _Omar E. Pol_, Apr 21 2012
%F a(n) ~ exp(Pi*sqrt(2*n/3))/(4*sqrt(3)) * (1 - (3 + 6*gamma + Pi^2/24 + 3*log(6*n/Pi^2))/(Pi*sqrt(6*n))), where gamma is the Euler-Mascheroni constant A001620. - _Vaclav Kotesovec_, Oct 24 2016
%F G.f.: Sum_{k>=1} x^(2*k)/(1 - x^k)^2 / Product_{j>=1} (1 - x^j). - _Ilya Gutkovskiy_, Mar 05 2021
%F a(n) = Sum_{k=1..n-1} p(n+j,j), where p(n,j) is the number of partitions of j having exactly j parts. E.g., a(4) = p(5,1) + p(6,2) + p(7,3) = 1+3+4 = 8. - _Gregory L. Simay_, Aug 19 2022
%e For n = 4 the five partitions of 4 are: 4, 3+1, 2+2, 2+1+1, 1+1+1+1. The sum of all parts is 4+3+1+2+2+2+1+1+1+1+1+1 = 20. The sum of all parts is also the product n*p(n) = 4*5 = 20, where p(n) = A000041(n) is the number of partitions of n. On the other hand the number of parts in all partitions of 4 is equal to 12, so a(4) = 20-12 = 8.
%p b:= proc(n, i) option remember; local f, g;
%p if n=0 then [1, 0]
%p elif i<1 then [0, 0]
%p elif i>n then b(n, i-1)
%p else f:= b(n, i-1); g:= b(n-i, i);
%p [f[1]+g[1], f[2]+g[2] +g[1]*(i-1)]
%p fi
%p end:
%p a:= n-> b(n, n)[2]:
%p seq(a(n), n=1..50); # _Alois P. Heinz_, Feb 20 2012
%t b[n_, i_] := b[n, i] = Module[{f, g}, Which[n==0, {1, 0}, i<1, {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_, Oct 22 2015, after _Alois P. Heinz_ *)
%o (PARI) a(n) = n*numbpart(n) - sum(m=1, n, numdiv(m)*numbpart(n-m)); \\ _Michel Marcus_, Oct 22 2015
%Y Cf. A000041, A006128, A066186, A207034.
%K nonn
%O 1,3
%A _Omar E. Pol_, Nov 10 2011