A037032 Total number of prime parts in all partitions of n.
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
Offset: 1
Keywords
Examples
From _Omar E. Pol_, Nov 20 2011 (Start): 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)
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..1000
Programs
-
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]: seq(a(n), n=1..100); # Alois P. Heinz, Oct 27 2012
-
Mathematica
a[n_] := Sum[PrimeNu[k]*PartitionsP[n - k], {k, 1, n}]; Array[a, 100] (* Jean-François Alcover, Mar 16 2015, after Vladeta Jovovic *)
-
PARI
a(n)={sum(k=1, n, omega(k)*numbpart(n-k))} \\ Andrew Howroyd, Dec 28 2017
Formula
a(n) = Sum_{k=1..floor(n/2)} k*A222656(n,k). - Alois P. Heinz, May 29 2013
G.f.: Sum_{i>=1} x^prime(i)/(1 - x^prime(i)) / Product_{j>=1} (1 - x^j). - Ilya Gutkovskiy, Jan 24 2017
Extensions
More terms from Naohiro Nomoto, Apr 19 2002
Comments