include("euler.jl")
function find_next_prime(primes)
n = primes[end]
while true
n += 2
not_prime = false
for q ∈ primes
not_prime = Euler.divides(q, n)
if not_prime
break
end
end
if not_prime
continue
end
return(n)
end
end;
function find_n_primes(n::Integer)
primes = [2, 3]
while length(primes) < n
next_prime = find_next_prime(primes)
push!(primes, next_prime)
end
return primes
end;
p7() = find_n_primes(10_001)[end];
p7()104743