def sum_of_primes_under(n): start = 2 total = 0 while start < n: total += start start = get_next_prime(start) return total
def nth_prime(n): start = 0 for i in xrange(n): prime = mathtools.get_next_prime(start) start = prime return prime