cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A037032 Total number of prime parts in all partitions of n.

This page as a plain text file.
%I A037032 #40 Aug 07 2019 15:47:39
%S A037032 0,1,2,4,7,13,20,32,48,73,105,153,214,302,415,569,767,1034,1371,1817,
%T A037032 2380,3110,4025,5199,6659,8512,10806,13684,17229,21645,27049,33728,
%U A037032 41872,51863,63988,78779,96645,118322,144406,175884,213617,258957,313094,377867
%N A037032 Total number of prime parts in all partitions of n.
%C A037032 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 A037032 Alois P. Heinz, <a href="/A037032/b037032.txt">Table of n, a(n) for n = 1..1000</a>
%F A037032 a(n) = Sum_{k=1..n} A001221(k)*A000041(n-k). - _Vladeta Jovovic_, Aug 22 2002
%F A037032 a(n) = Sum_{k=1..floor(n/2)} k*A222656(n,k). - _Alois P. Heinz_, May 29 2013
%F A037032 G.f.: Sum_{i>=1} x^prime(i)/(1 - x^prime(i)) / Product_{j>=1} (1 - x^j). - _Ilya Gutkovskiy_, Jan 24 2017
%e A037032 From _Omar E. Pol_, Nov 20 2011 (Start):
%e A037032 For n = 6 we have:
%e A037032 --------------------------------------
%e A037032 .                        Number of
%e A037032 Partitions              prime parts
%e A037032 --------------------------------------
%e A037032 6 .......................... 0
%e A037032 3 + 3 ...................... 2
%e A037032 4 + 2 ...................... 1
%e A037032 2 + 2 + 2 .................. 3
%e A037032 5 + 1 ...................... 1
%e A037032 3 + 2 + 1 .................. 2
%e A037032 4 + 1 + 1 .................. 0
%e A037032 2 + 2 + 1 + 1 .............. 2
%e A037032 3 + 1 + 1 + 1 .............. 1
%e A037032 2 + 1 + 1 + 1 + 1 .......... 1
%e A037032 1 + 1 + 1 + 1 + 1 + 1 ...... 0
%e A037032 ------------------------------------
%e A037032 Total ..................... 13
%e A037032 So a(6) = 13.
%e A037032 (End)
%p A037032 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 A037032 # second Maple program
%p A037032 b:= proc(n, i) option remember; local g;
%p A037032       if n=0 or i=1 then [1, 0]
%p A037032     else g:= `if`(i>n, [0$2], b(n-i, i));
%p A037032          b(n, i-1) +g +[0, `if`(isprime(i), g[1], 0)]
%p A037032       fi
%p A037032     end:
%p A037032 a:= n-> b(n, n)[2]:
%p A037032 seq(a(n), n=1..100);  # _Alois P. Heinz_, Oct 27 2012
%t A037032 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 A037032 (PARI) a(n)={sum(k=1, n, omega(k)*numbpart(n-k))} \\ _Andrew Howroyd_, Dec 28 2017
%Y A037032 Cf. A000041, A001221, A073118.
%K A037032 nonn
%O A037032 1,3
%A A037032 _G. L. Honaker, Jr._
%E A037032 More terms from _Naohiro Nomoto_, Apr 19 2002