login
A073118
Total sum of prime parts in all partitions of n.
10
0, 2, 5, 9, 19, 33, 57, 87, 136, 206, 311, 446, 650, 914, 1284, 1762, 2432, 3276, 4433, 5888, 7824, 10272, 13479, 17471, 22642, 29087, 37283, 47453, 60306, 76112, 95931, 120201, 150338, 187141, 232507, 287591, 355143, 436849, 536347, 656282, 801647, 976095
OFFSET
1,2
LINKS
FORMULA
a(n) = Sum_{k=1..n} A008472(k)*A000041(n-k).
G.f.: Sum_{i>=1} prime(i)*x^prime(i)/(1 - x^prime(i)) / Product_{j>=1} (1 - x^j). - Ilya Gutkovskiy, Feb 01 2017
EXAMPLE
From Omar E. Pol, Nov 20 2011 (Start):
For n = 6 we have:
--------------------------------------
. Sum of
Partitions prime parts
--------------------------------------
6 .......................... 0
3 + 3 ...................... 6
4 + 2 ...................... 2
2 + 2 + 2 .................. 6
5 + 1 ...................... 5
3 + 2 + 1 .................. 5
4 + 1 + 1 .................. 0
2 + 2 + 1 + 1 .............. 4
3 + 1 + 1 + 1 .............. 3
2 + 1 + 1 + 1 + 1 .......... 2
1 + 1 + 1 + 1 + 1 + 1 ...... 0
--------------------------------------
Total ..................... 33
So a(6) = 33. (End)
MAPLE
b:= proc(n, i) option remember; local h, j, t;
if n<0 then [0, 0]
elif n=0 then [1, 0]
elif i<1 then [0, 0]
else h:= [0, 0];
for j from 0 to iquo(n, i) do
t:= b(n-i*j, i-1);
h:= [h[1]+t[1], h[2]+t[2]+`if`(isprime(i), t[1]*i*j, 0)]
od; h
fi
end:
a:= n-> b(n, n)[2]:
seq(a(n), n=1..50); # Alois P. Heinz, Nov 20 2011
MATHEMATICA
f[n_] := Apply[Plus, Select[ Flatten[ IntegerPartitions[n]], PrimeQ[ # ] & ]]; Table[ f[n], {n, 1, 41} ]
a[n_] := Sum[Total[FactorInteger[k][[All, 1]]]*PartitionsP[n-k], {k, 1, n}] - PartitionsP[n-1]; Array[a, 50] (* Jean-François Alcover, Dec 27 2015 *)
PROG
(PARI) a(n)={sum(k=1, n, vecsum(factor(k)[, 1])*numbpart(n-k))} \\ Andrew Howroyd, Dec 28 2017
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Vladeta Jovovic, Aug 24 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v, Aug 26 2002
STATUS
approved