login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A305611
Number of distinct positive subset-sums of the multiset of prime factors of n.
11
0, 1, 1, 2, 1, 3, 1, 3, 2, 3, 1, 5, 1, 3, 3, 4, 1, 5, 1, 5, 3, 3, 1, 7, 2, 3, 3, 5, 1, 6, 1, 5, 3, 3, 3, 8, 1, 3, 3, 7, 1, 7, 1, 5, 5, 3, 1, 9, 2, 5, 3, 5, 1, 7, 3, 7, 3, 3, 1, 9, 1, 3, 5, 6, 3, 7, 1, 5, 3, 6, 1, 10, 1, 3, 5, 5, 3, 7, 1, 9, 4, 3, 1, 10, 3, 3
OFFSET
1,4
COMMENTS
An integer n is a positive subset-sum of a multiset y if there exists a nonempty submultiset of y with sum n.
One less than the number of distinct values obtained when A001414 is applied to all divisors of n. - Antti Karttunen, Jun 13 2018
LINKS
EXAMPLE
The a(12) = 5 positive subset-sums of {2, 2, 3} are 2, 3, 4, 5, and 7.
MATHEMATICA
Table[Length[Union[Total/@Rest[Subsets[Join@@Cases[FactorInteger[n], {p_, k_}:>Table[p, {k}]]]]]], {n, 100}]
PROG
(PARI)
up_to = 65537;
A001414(n) = ((n=factor(n))[, 1]~*n[, 2]); \\ From A001414.
v001414 = vector(up_to, n, A001414(n));
A305611(n) = { my(m=Map(), s, k=0); fordiv(n, d, if(!mapisdefined(m, s = v001414[d]), mapput(m, s, s); k++)); (k-1); }; \\ Antti Karttunen, Jun 13 2018
(Python)
from sympy import factorint
from sympy.utilities.iterables import multiset_combinations
def A305611(n):
fs = factorint(n)
return len(set(sum(d) for i in range(1, sum(fs.values())+1) for d in multiset_combinations(fs, i))) # Chai Wah Wu, Aug 23 2021
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jun 06 2018
STATUS
approved