A331387 Number of integer partitions whose sum of primes of parts equals their sum of parts plus n.
1, 2, 4, 7, 11, 16, 24, 34, 47, 64, 86, 113, 148, 191, 245, 310, 390, 486, 602, 740, 907, 1104, 1338, 1613, 1937, 2315, 2758, 3272, 3871, 4562, 5362, 6283, 7344, 8558, 9952, 11542, 13356, 15419, 17766, 20425, 23440, 26846, 30696, 35032, 39917, 45406
Offset: 0
Keywords
Examples
The a(0) = 1 through a(5) = 16 partitions: () (1) (3) (4) (33) (43) (2) (11) (31) (41) (331) (21) (32) (42) (332) (22) (111) (311) (411) (211) (321) (421) (221) (322) (422) (222) (1111) (3111) (2111) (3211) (2211) (3221) (2221) (3222) (2222) (11111) (21111) (22111) (22211) (22221) (22222) For example, the partition (3,2,2,1) is counted under n = 5 because it has sum of primes 5+3+3+2 = 13 and its sum of parts plus n is also 3+2+2+1+5 = 13.
Links
- Andrew Howroyd, Table of n, a(n) for n = 0..1000
Crossrefs
Programs
-
Mathematica
Table[Sum[Length[Select[IntegerPartitions[k],Total[Prime/@#]==k+n&]],{k,0,2*n}],{n,0,10}]
-
PARI
seq(n)={my(m=1); while(prime(m)-m<=n, m++); Vec(1/prod(k=1, m, 1 - x^(prime(k)-k) + O(x*x^n)))} \\ Andrew Howroyd, Apr 16 2021
Formula
G.f.: 1/Product_{k>=1} 1 - x^(prime(k)-k). - Andrew Howroyd, Apr 16 2021
Extensions
Terms a(31) and beyond from Andrew Howroyd, Apr 16 2021
Comments