|
|
A037032
|
|
Total number of prime parts in all partitions of n.
|
|
15
|
|
|
0, 1, 2, 4, 7, 13, 20, 32, 48, 73, 105, 153, 214, 302, 415, 569, 767, 1034, 1371, 1817, 2380, 3110, 4025, 5199, 6659, 8512, 10806, 13684, 17229, 21645, 27049, 33728, 41872, 51863, 63988, 78779, 96645, 118322, 144406, 175884, 213617, 258957, 313094, 377867
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
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
|
|
LINKS
|
|
|
FORMULA
|
G.f.: Sum_{i>=1} x^prime(i)/(1 - x^prime(i)) / Product_{j>=1} (1 - x^j). - Ilya Gutkovskiy, Jan 24 2017
|
|
EXAMPLE
|
For n = 6 we have:
--------------------------------------
. Number of
Partitions prime parts
--------------------------------------
6 .......................... 0
3 + 3 ...................... 2
4 + 2 ...................... 1
2 + 2 + 2 .................. 3
5 + 1 ...................... 1
3 + 2 + 1 .................. 2
4 + 1 + 1 .................. 0
2 + 2 + 1 + 1 .............. 2
3 + 1 + 1 + 1 .............. 1
2 + 1 + 1 + 1 + 1 .......... 1
1 + 1 + 1 + 1 + 1 + 1 ...... 0
------------------------------------
Total ..................... 13
So a(6) = 13.
(End)
|
|
MAPLE
|
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
# second Maple program
b:= proc(n, i) option remember; local g;
if n=0 or i=1 then [1, 0]
else g:= `if`(i>n, [0$2], b(n-i, i));
b(n, i-1) +g +[0, `if`(isprime(i), g[1], 0)]
fi
end:
a:= n-> b(n, n)[2]:
|
|
MATHEMATICA
|
|
|
PROG
|
(PARI) a(n)={sum(k=1, n, omega(k)*numbpart(n-k))} \\ Andrew Howroyd, Dec 28 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|