A365660 Number of integer partitions of 2n with exactly n distinct sums of nonempty submultisets.
1, 1, 1, 3, 2, 6, 6, 16, 12, 20, 26, 59, 45, 79, 94, 186, 142, 231, 244, 442, 470, 616, 746, 1340, 1053, 1548, 1852, 2780, 2826, 3874, 4320, 6617, 6286, 7924, 9178, 13180, 13634, 17494, 20356, 28220, 29176, 37188, 41932, 56037
Offset: 0
Examples
The partition (433) has sums 3, 4, 6, 7, 10 so is counted under a(5). The a(1) = 1 through a(7) = 16 partitions: (2) (2,2) (4,2) (4,2,2) (4,3,3) (6,4,2) (6,5,3) (5,1) (2,2,2,2) (4,4,2) (6,5,1) (8,4,2) (2,2,2) (6,2,2) (4,4,2,2) (8,5,1) (8,1,1) (6,2,2,2) (9,3,2) (4,2,2,2) (4,2,2,2,2) (9,4,1) (2,2,2,2,2) (2,2,2,2,2,2) (10,3,1) (11,2,1) (4,4,4,2) (5,3,3,3) (6,4,2,2) (8,2,2,2) (11,1,1,1) (4,4,2,2,2) (6,2,2,2,2) (4,2,2,2,2,2) (2,2,2,2,2,2,2)
Crossrefs
Programs
-
Mathematica
msubs[y_]:=primeMS/@Divisors[Times@@Prime/@y]; Table[Length[Select[IntegerPartitions[2n], Length[Union[Total/@Rest[msubs[#]]]]==n&]],{n,0,10}]
-
Python
from collections import Counter from sympy.utilities.iterables import partitions, multiset_combinations def A365660(n): c = 0 for p in partitions(n<<1): q, s = list(Counter(p).elements()), set() for l in range(1,len(q)+1): for k in multiset_combinations(q,l): s.add(sum(k)) if len(s) > n: break else: continue break if len(s)==n: c += 1 return c # Chai Wah Wu, Sep 20 2023
Extensions
a(21)-a(38) from Chai Wah Wu, Sep 20 2023
a(39)-a(43) from Chai Wah Wu, Sep 21 2023
Comments