login
A237289
Sum of positive numbers k <= sigma(n) that are not a sum of any subset of distinct divisors of n.
3
0, 0, 2, 0, 9, 0, 20, 0, 39, 27, 54, 0, 77, 108, 108, 0, 135, 0, 170, 0, 272, 378, 252, 0, 372, 567, 500, 0, 405, 0, 464, 0, 792, 1053, 792, 0, 665, 1350, 1148, 0, 819, 0, 902, 882, 897, 2052, 1080, 0, 1425, 1395, 2052, 1715, 1377, 0, 2052, 0, 2600, 3375, 1710
OFFSET
1,3
FORMULA
a(n) = A184387(n) - A237290(n).
a(p) = p(p - 1) / 2 - 1 for p = prime > 2.
a(n) = 0 for practical numbers (A005153), a(n) > 0 for numbers that are not practical (A237287).
a(n) = A184387(n) - A229335(n) for numbers n such that A119347(n) = A100587(n).
EXAMPLE
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).
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).
a(14) = 4+5+6+11+12+13+18+19+20 = a(15) = 2+7+10+11+12+13+14+17+22 = 108.
MAPLE
isSumDist := proc(n, k)
local dvs ;
dvs := numtheory[divisors](n) ;
for s in combinat[powerset](dvs) do
add(m, m=op(s)) ;
if % = k then
return true;
end if;
end do:
false ;
end proc:
A237289 := proc(n)
local a;
a := 0 ;
for k from 1 to numtheory[sigma](n) do
if not isSumDist(n, k) then
a := a+k;
end if;
end do:
a ;
end proc:
seq(A237289(n), n=1..20) ; # R. J. Mathar, Mar 13 2014
MATHEMATICA
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 *)
PROG
(Python)
from sympy import divisors
def A237289(n):
ds = divisors(n)
c, s = {0}, sum(ds)
for d in ds:
c |= {a+d for a in c}
return (s*(s+1)>>1)-sum(a for a in c if 1<=a<=s) # Chai Wah Wu, Jul 05 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Jaroslav Krizek, Mar 02 2014
EXTENSIONS
a(55) and a(57)-a(59) corrected by Giovanni Resta, Mar 13 2014
STATUS
approved