Svoboda | Graniru | BBC Russia | Golosameriki | Facebook
login
A301854
Number of positive special sums of integer partitions of n.
14
1, 3, 7, 13, 25, 40, 67, 100, 158, 220, 336, 452, 649, 862, 1228, 1553, 2155, 2738, 3674, 4612, 6124, 7497, 9857, 12118, 15524, 18821, 24152, 28863, 36549, 44002, 54576, 65125, 80943, 95470, 117991, 139382, 169389, 199144, 242925, 283353, 342139, 400701, 479001
OFFSET
1,2
COMMENTS
A positive special sum of an integer partition y is a number n > 0 such that exactly one submultiset of y sums to n.
EXAMPLE
The a(4) = 13 special positive subset-sums:
1<=(1111), 2<=(1111), 3<=(1111), 4<=(1111),
1<=(211), 3<=(211), 4<=(211),
1<=(31), 3<=(31), 4<=(31),
2<=(22), 4<=(22),
4<=(4).
MATHEMATICA
uqsubs[y_]:=Join@@Select[GatherBy[Union[Rest[Subsets[y]]], Total], Length[#]===1&];
Table[Total[Length/@uqsubs/@IntegerPartitions[n]], {n, 25}]
PROG
(Python)
from collections import Counter
from sympy.utilities.iterables import partitions, multiset_combinations
def A301854(n): return sum(sum(1 for r in Counter(sum(q) for l in range(1, len(p)+1) for q in multiset_combinations(p, l)).values() if r==1) for p in (tuple(Counter(x).elements()) for x in partitions(n))) # Chai Wah Wu, Sep 26 2023
KEYWORD
nonn
AUTHOR
Gus Wiseman, Mar 27 2018
EXTENSIONS
a(21)-a(35) from Alois P. Heinz, Apr 08 2018
a(36)-a(43) from Chai Wah Wu, Sep 26 2023
STATUS
approved