%I #40 Aug 07 2019 15:47:39
%S 0,1,2,4,7,13,20,32,48,73,105,153,214,302,415,569,767,1034,1371,1817,
%T 2380,3110,4025,5199,6659,8512,10806,13684,17229,21645,27049,33728,
%U 41872,51863,63988,78779,96645,118322,144406,175884,213617,258957,313094,377867
%N Total number of prime parts in all partitions of n.
%C a(n) is also the sum of the differences between the sum of p-th largest and the sum of (p+1)st largest elements in all partitions of n for all primes p. - _Omar E. Pol_, Oct 25 2012
%H Alois P. Heinz, <a href="/A037032/b037032.txt">Table of n, a(n) for n = 1..1000</a>
%F a(n) = Sum_{k=1..n} A001221(k)*A000041(n-k). - _Vladeta Jovovic_, Aug 22 2002
%F a(n) = Sum_{k=1..floor(n/2)} k*A222656(n,k). - _Alois P. Heinz_, May 29 2013
%F G.f.: Sum_{i>=1} x^prime(i)/(1 - x^prime(i)) / Product_{j>=1} (1 - x^j). - _Ilya Gutkovskiy_, Jan 24 2017
%e From _Omar E. Pol_, Nov 20 2011 (Start):
%e For n = 6 we have:
%e --------------------------------------
%e . Number of
%e Partitions prime parts
%e --------------------------------------
%e 6 .......................... 0
%e 3 + 3 ...................... 2
%e 4 + 2 ...................... 1
%e 2 + 2 + 2 .................. 3
%e 5 + 1 ...................... 1
%e 3 + 2 + 1 .................. 2
%e 4 + 1 + 1 .................. 0
%e 2 + 2 + 1 + 1 .............. 2
%e 3 + 1 + 1 + 1 .............. 1
%e 2 + 1 + 1 + 1 + 1 .......... 1
%e 1 + 1 + 1 + 1 + 1 + 1 ...... 0
%e ------------------------------------
%e Total ..................... 13
%e So a(6) = 13.
%e (End)
%p with(combinat): a:=proc(n) local P,c,j,i: P:=partition(n): c:=0: for j from 1 to numbpart(n) do for i from 1 to nops(P[j]) do if isprime(P[j][i])=true then c:=c+1 else c:=c fi: od: od: c: end: seq(a(n),n=1..42); # _Emeric Deutsch_, Mar 30 2006
%p # second Maple program
%p b:= proc(n, i) option remember; local g;
%p if n=0 or i=1 then [1, 0]
%p else g:= `if`(i>n, [0$2], b(n-i, i));
%p b(n, i-1) +g +[0, `if`(isprime(i), g[1], 0)]
%p fi
%p end:
%p a:= n-> b(n, n)[2]:
%p seq(a(n), n=1..100); # _Alois P. Heinz_, Oct 27 2012
%t a[n_] := Sum[PrimeNu[k]*PartitionsP[n - k], {k, 1, n}]; Array[a, 100] (* _Jean-François Alcover_, Mar 16 2015, after _Vladeta Jovovic_ *)
%o (PARI) a(n)={sum(k=1, n, omega(k)*numbpart(n-k))} \\ _Andrew Howroyd_, Dec 28 2017
%Y Cf. A000041, A001221, A073118.
%K nonn
%O 1,3
%A _G. L. Honaker, Jr._
%E More terms from _Naohiro Nomoto_, Apr 19 2002