cp's OEIS Frontend

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.

A237289 Sum of positive numbers k <= sigma(n) that are not a sum of any subset of distinct divisors of n.

This page as a plain text file.
%I A237289 #34 Jul 23 2025 00:55:28
%S A237289 0,0,2,0,9,0,20,0,39,27,54,0,77,108,108,0,135,0,170,0,272,378,252,0,
%T A237289 372,567,500,0,405,0,464,0,792,1053,792,0,665,1350,1148,0,819,0,902,
%U A237289 882,897,2052,1080,0,1425,1395,2052,1715,1377,0,2052,0,2600,3375,1710
%N A237289 Sum of positive numbers k <= sigma(n) that are not a sum of any subset of distinct divisors of n.
%H A237289 David A. Corneth, <a href="/A237289/b237289.txt">Table of n, a(n) for n = 1..10000</a>
%F A237289 a(n) = A184387(n) - A237290(n).
%F A237289 a(p) = p(p - 1) / 2 - 1 for p = prime > 2.
%F A237289 a(n) = 0 for practical numbers (A005153), a(n) > 0 for numbers that are not practical (A237287).
%F A237289 a(n) = A184387(n) - A229335(n) for numbers n such that A119347(n) = A100587(n).
%e A237289 For n = 5, a(5) = 2 + 3 + 4 = 9 (numbers 2, 3 and 4 are not a sum of any subset of distinct divisors of 5).
%e A237289 Numbers n = 14 and 15 are an interesting pair of consecutive numbers with identical value of sigma(n) such that simultaneously a(14) = a(15) and A237290(14) = A237290(15).
%e A237289 a(14) = 4+5+6+11+12+13+18+19+20 = a(15) = 2+7+10+11+12+13+14+17+22 = 108.
%e A237289 a(6) = 0 as 6 is practical; the sums into distinct divisors from 1 through 12 are 1 = 1, 2 = 2, 3 = 3, 4 = 1 + 3, 5 = 2 + 3, 6 = 1 + 2 + 3, 7 through 12 are (1 through 6) + 6. So none are not a sum distinct divisors of 6. - _David A. Corneth_, Jul 22 2025
%p A237289 isSumDist := proc(n,k)
%p A237289     local dvs ;
%p A237289     dvs := numtheory[divisors](n) ;
%p A237289     for s in combinat[powerset](dvs) do
%p A237289         add(m,m=op(s)) ;
%p A237289         if % = k then
%p A237289             return true;
%p A237289         end if;
%p A237289     end do:
%p A237289     false ;
%p A237289 end proc:
%p A237289 A237289 := proc(n)
%p A237289     local a;
%p A237289     a := 0 ;
%p A237289     for k from 1 to numtheory[sigma](n) do
%p A237289         if not isSumDist(n,k) then
%p A237289             a := a+k;
%p A237289         end if;
%p A237289     end do:
%p A237289     a ;
%p A237289 end proc:
%p A237289 seq(A237289(n),n=1..20) ; # _R. J. Mathar_, Mar 13 2014
%t A237289 a[n_] := Block[{d = Divisors@n, s}, s = Plus @@ d; s*(s + 1)/2 - Plus @@ Union[Plus @@@ Subsets@d]]; m = Array[a, 59] (* _Giovanni Resta_, Mar 13 2014 *)
%o A237289 (Python)
%o A237289 from sympy import divisors
%o A237289 def A237289(n):
%o A237289     ds = divisors(n)
%o A237289     c, s = {0}, sum(ds)
%o A237289     for d in ds:
%o A237289         c |=  {a+d for a in c}
%o A237289     return (s*(s+1)>>1)-sum(a for a in c if 1<=a<=s) # _Chai Wah Wu_, Jul 05 2023
%Y A237289 Cf. A119348, A005153, A184387, A237287, A237290.
%K A237289 nonn
%O A237289 1,3
%A A237289 _Jaroslav Krizek_, Mar 02 2014
%E A237289 a(55) and a(57)-a(59) corrected by _Giovanni Resta_, Mar 13 2014