def number_of_primes(a, b): i = 0 while True: n = i * i + i * a + b if n < 0 or not is_prime(n): return i i += 1
def run(): n = 3 number_of_primes = 1 while number_of_primes != 10001: if is_prime(n): number_of_primes += 1 n += 2 return n - 2