You could try this function to compute the sum of divisors faster, and 
using very little memory:
~~~
function sumFactors(n)
    f = 1
    for (p,e) in factor(n)
        f *= div(p^(e+1)-1,p-1)
    end
    return f
end
~~~

Reply via email to