def p7alt(nth=10001): """What is the 10001st prime number?""" N = nth while nth > N/(math.log(N)-1): N *= 1.1 N = int(N) #print('estimated N = %d' % N) return list(nttools.sieveErat(int(N)))[nth-1]
def p10(N=10): """Find the sum of all the primes below two million.""" return sum(nttools.sieveErat(N))