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.

A331387 Number of integer partitions whose sum of primes of parts equals their sum of parts plus n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jan 17 2020

Keywords

Comments

Primes of parts means the prime counting function applied to the part sizes. Equivalently, a(n) is the number of integer partitions with part sizes in A014689(n) interpreted as a multiset. - Andrew Howroyd, Apr 17 2021

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.
		

Crossrefs

Column sums of A331385.
Partitions into primes are A000607.
Partitions whose sum of primes is divisible by their sum are A331379.
Partitions whose product divides their sum of primes are A331381.
Partitions whose product equals their sum of primes are A331383.

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