OFFSET
1,3
FORMULA
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