Reuse the list of primes in calls to sum_of_proper_divisors()