%I #30 Jan 02 2023 09:00:57
%S 2,4,4,8,4,13,4,16,8,16,4,29,4,16,16,32,4,40,4,43,16,16,4,61,8,16,16,
%T 57,4,73,4,64,16,16,16,92,4,16,16,91,4,97,4,64,56,16,4,125,8,64,16,64,
%U 4,121,16,121,16,16,4,169,4,16,60,128,16,145,4,64,16,143,4,196,4,16,64,64
%N Number of distinct subset sums of the subsets of the set of divisors of n.
%C Conjecture: When the terms are sorted and the duplicates deleted a supersequence of A030058 is obtained. Note that A030058 is a result of the same operation applied to A030057.
%C a(p^k) = 2^(k+1) if p is prime, and a(n) = 2n+1 if n is an even perfect number. - _David Radcliffe_, Dec 22 2022
%F a(n) = 1 + A119347(n). - _Rémy Sigrist_, Jun 10 2019
%e The subsets of the set of divisors of 6 are {{},{1},{2},{3},{6},{1,2},{1,3},{1,6},{2,3},{2,6},{3,6},{1,2,3},{1,2,6},{1,3,6},{2,3,6},{1,2,3,6}}, with the following sums {0,1,2,3,6,3,4,7,5,8,9,6,9,10,11,12}, of which 13 are distinct. Therefore, a(6)=13.
%p A308605 := proc(n)
%p # set of the divisors
%p dvs := numtheory[divisors](n) ;
%p # set of all the subsets of the divisors
%p pdivs := combinat[powerset](dvs) ;
%p # the set of the sums in subsets of divisors
%p dvss := {} ;
%p # loop over all subsets of divisors
%p for s in pdivs do
%p # compute sum over entries of the subset
%p sps := add(d,d=s) ;
%p # add sum to the realized set of sums
%p dvss := dvss union {sps} ;
%p end do:
%p # count number of distinct entries (distinct sums)
%p nops(dvss) ;
%p end proc:
%p seq(A308605(n),n=1..20) ; # _R. J. Mathar_, Dec 20 2022
%t f[n_]:=Length[Union[Total/@Subsets[Divisors[n]]]]; f/@Range[100]
%o (Python)
%o from sympy import divisors
%o def a308605(n):
%o s = set([0])
%o for d in divisors(n):
%o s = s.union(set(x + d for x in s))
%o return len(s) # _David Radcliffe_, Dec 22 2022
%Y Cf. A030057, A030058, A119347.
%K nonn
%O 1,1
%A _Ivan N. Ianakiev_, Jun 10 2019