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.
%I A237290 #37 Nov 29 2024 14:45:59 %S A237290 1,6,8,28,12,78,16,120,52,144,24,406,28,192,192,496,36,780,40,903,256, %T A237290 288,48,1830,124,336,320,1596,60,2628,64,2016,384,432,384,4186,76,480, %U A237290 448,4095,84,4656,88,2688,2184,576,96,7750,228,2976,576,3136,108,7260 %N A237290 Sum of positive numbers k <= sigma(n) that are a sum of any subset of distinct divisors of n. %H A237290 Antti Karttunen, <a href="/A237290/b237290.txt">Table of n, a(n) for n = 1..20000</a> (first 200 terms from Vincenzo Librandi) %H A237290 Jon Maiga, <a href="http://sequencedb.net/s/A237290">Computer-generated formulas for A237290</a>, Sequence Machine. %F A237290 a(n) = A184387(n) - A237289(n). %F A237290 a(p) = 2(p+2) for odd primes p. %F A237290 a(n) = A184387(n) for practical numbers n (A005153), a(n) < A184387(n) for numbers n that are not practical (A237287). %F A237290 a(n) = A000203(n) * (A119347(n)+1) / 2. [Found by Sequence Machine and easily seen to be true. Compare for example to the formulas of A229335.] - _Antti Karttunen_, Nov 29 2024 %e A237290 For n = 5, a(5) = 1 + 5 + 6 = 12 (each of the numbers 1, 5 and 6 is the sum of a subset of distinct divisors of 5). %e A237290 The numbers n = 14 and 15 is an interesting pair of consecutive numbers with identical value of sigma(n) such that simultaneously a(14) = a(15) and A237289(14) = A237289(15). %e A237290 a(14) = 1+2+3+7+8+9+10+14+15+16+17+21+22+23+24 = a(15) = 1+3+4+5+6+8+9+15+16+18+19+20+21+23+24 = 192. %p A237290 isSumDist := proc(n,k) %p A237290 local dvs,s ; %p A237290 dvs := numtheory[divisors](n) ; %p A237290 for s in combinat[powerset](dvs) do %p A237290 add(m,m=op(s)) ; %p A237290 if % = k then %p A237290 return true; %p A237290 end if; %p A237290 end do: %p A237290 false ; %p A237290 end proc: %p A237290 A237290 := proc(n) %p A237290 local a; %p A237290 a := 0 ; %p A237290 for k from 1 to numtheory[sigma](n) do %p A237290 if isSumDist(n,k) then %p A237290 a := a+k; %p A237290 end if; %p A237290 end do: %p A237290 end proc: %p A237290 seq(A237290(n),n=1..20) ; # _R. J. Mathar_, Mar 13 2014 %t A237290 a[n_] := Plus @@ Union[Plus @@@ Subsets@ Divisors@ n]; Array[a, 54] (* _Giovanni Resta_, Mar 13 2014 *) %o A237290 (PARI) padbin(n, len) = {b = binary(n); while(length(b) < len, b = concat(0, b);); b;} %o A237290 a(n) = {vks = []; d = divisors(n); nbd = #d; for (i=1, 2^nbd-1, b = padbin(i, nbd); onek = sum(j=1, nbd, d[j]*b[j]); vks = Set(concat(vks, onek));); sum(i=1, #vks, vks[i]);} \\ _Michel Marcus_, Mar 09 2014 %o A237290 (PARI) A237290(n) = { my(c=[0]); fordiv(n,d, c = Set(concat(c,vector(#c,i,c[i]+d)))); vecsum(c); }; \\ after _Chai Wah Wu_'s Python-code, _Antti Karttunen_, Nov 29 2024 %o A237290 (Python) %o A237290 from sympy import divisors %o A237290 def A237290(n): %o A237290 ds = divisors(n) %o A237290 c, s = {0}, sum(ds) %o A237290 for d in ds: %o A237290 c |= {a+d for a in c} %o A237290 return sum(a for a in c if 1<=a<=s) # _Chai Wah Wu_, Jul 05 2023 %Y A237290 Cf. A000203, A119348, A005153, A119347 (count of the same numbers), A184387, A229335, A237287, A237289. %K A237290 nonn %O A237290 1,2 %A A237290 _Jaroslav Krizek_, Mar 02 2014