login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A073118 Total sum of prime parts in all partitions of n. 10

%I #31 Aug 07 2019 15:50:39

%S 0,2,5,9,19,33,57,87,136,206,311,446,650,914,1284,1762,2432,3276,4433,

%T 5888,7824,10272,13479,17471,22642,29087,37283,47453,60306,76112,

%U 95931,120201,150338,187141,232507,287591,355143,436849,536347,656282,801647,976095

%N Total sum of prime parts in all partitions of n.

%H Alois P. Heinz, <a href="/A073118/b073118.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = Sum_{k=1..n} A008472(k)*A000041(n-k).

%F 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

%e From _Omar E. Pol_, Nov 20 2011 (Start):

%e For n = 6 we have:

%e --------------------------------------

%e . Sum of

%e Partitions prime parts

%e --------------------------------------

%e 6 .......................... 0

%e 3 + 3 ...................... 6

%e 4 + 2 ...................... 2

%e 2 + 2 + 2 .................. 6

%e 5 + 1 ...................... 5

%e 3 + 2 + 1 .................. 5

%e 4 + 1 + 1 .................. 0

%e 2 + 2 + 1 + 1 .............. 4

%e 3 + 1 + 1 + 1 .............. 3

%e 2 + 1 + 1 + 1 + 1 .......... 2

%e 1 + 1 + 1 + 1 + 1 + 1 ...... 0

%e --------------------------------------

%e Total ..................... 33

%e So a(6) = 33. (End)

%p b:= proc(n, i) option remember; local h, j, t;

%p if n<0 then [0, 0]

%p elif n=0 then [1, 0]

%p elif i<1 then [0, 0]

%p else h:= [0, 0];

%p for j from 0 to iquo(n, i) do

%p t:= b(n-i*j, i-1);

%p h:= [h[1]+t[1], h[2]+t[2]+`if`(isprime(i), t[1]*i*j, 0)]

%p od; h

%p fi

%p end:

%p a:= n-> b(n, n)[2]:

%p seq(a(n), n=1..50); # _Alois P. Heinz_, Nov 20 2011

%t f[n_] := Apply[Plus, Select[ Flatten[ IntegerPartitions[n]], PrimeQ[ # ] & ]]; Table[ f[n], {n, 1, 41} ]

%t 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 *)

%o (PARI) a(n)={sum(k=1, n, vecsum(factor(k)[, 1])*numbpart(n-k))} \\ _Andrew Howroyd_, Dec 28 2017

%Y Cf. A037032, A194545, A309561.

%K easy,nonn

%O 1,2

%A _Vladeta Jovovic_, Aug 24 2002

%E Edited and extended by _Robert G. Wilson v_, Aug 26 2002

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 08:27 EDT 2024. Contains 371769 sequences. (Running on oeis4.)