Speedups for divisor_sum