By listing the first six prime numbers: 2,3,5,7,11 and 13, we can see that the 6th prime is 13.
What is the 10001st prime number?
using Primes
function nthprime(N::Int64)
primes = [2]
n = 1
while length(primes) != N
if isprime(n) == true
push!(primes, n)
end
n = n+2
end
return last(primes)
end
nthprime(10001)