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.

A073118 Total sum of prime parts in all partitions of n.

This page as a plain text file.
%I A073118 #31 Aug 07 2019 15:50:39
%S A073118 0,2,5,9,19,33,57,87,136,206,311,446,650,914,1284,1762,2432,3276,4433,
%T A073118 5888,7824,10272,13479,17471,22642,29087,37283,47453,60306,76112,
%U A073118 95931,120201,150338,187141,232507,287591,355143,436849,536347,656282,801647,976095
%N A073118 Total sum of prime parts in all partitions of n.
%H A073118 Alois P. Heinz, <a href="/A073118/b073118.txt">Table of n, a(n) for n = 1..1000</a>
%F A073118 a(n) = Sum_{k=1..n} A008472(k)*A000041(n-k).
%F A073118 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 A073118 From _Omar E. Pol_, Nov 20 2011 (Start):
%e A073118 For n = 6 we have:
%e A073118 --------------------------------------
%e A073118 .                          Sum of
%e A073118 Partitions              prime parts
%e A073118 --------------------------------------
%e A073118 6 .......................... 0
%e A073118 3 + 3 ...................... 6
%e A073118 4 + 2 ...................... 2
%e A073118 2 + 2 + 2 .................. 6
%e A073118 5 + 1 ...................... 5
%e A073118 3 + 2 + 1 .................. 5
%e A073118 4 + 1 + 1 .................. 0
%e A073118 2 + 2 + 1 + 1 .............. 4
%e A073118 3 + 1 + 1 + 1 .............. 3
%e A073118 2 + 1 + 1 + 1 + 1 .......... 2
%e A073118 1 + 1 + 1 + 1 + 1 + 1 ...... 0
%e A073118 --------------------------------------
%e A073118 Total ..................... 33
%e A073118 So a(6) = 33. (End)
%p A073118 b:= proc(n, i) option remember; local h, j, t;
%p A073118       if n<0 then [0, 0]
%p A073118     elif n=0 then [1, 0]
%p A073118     elif i<1 then [0, 0]
%p A073118     else h:= [0, 0];
%p A073118          for j from 0 to iquo(n, i) do
%p A073118            t:= b(n-i*j, i-1);
%p A073118            h:= [h[1]+t[1], h[2]+t[2]+`if`(isprime(i), t[1]*i*j, 0)]
%p A073118          od; h
%p A073118       fi
%p A073118     end:
%p A073118 a:= n-> b(n, n)[2]:
%p A073118 seq(a(n), n=1..50);  # _Alois P. Heinz_, Nov 20 2011
%t A073118 f[n_] := Apply[Plus, Select[ Flatten[ IntegerPartitions[n]], PrimeQ[ # ] & ]]; Table[ f[n], {n, 1, 41} ]
%t A073118 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 A073118 (PARI) a(n)={sum(k=1, n, vecsum(factor(k)[, 1])*numbpart(n-k))} \\ _Andrew Howroyd_, Dec 28 2017
%Y A073118 Cf. A037032, A194545, A309561.
%K A073118 easy,nonn
%O A073118 1,2
%A A073118 _Vladeta Jovovic_, Aug 24 2002
%E A073118 Edited and extended by _Robert G. Wilson v_, Aug 26 2002