primes(1000)
length(primes(1e6)) # 78498 prime numbers less than one million
if (FALSE) {
length(primes(1e7)) # 664579 prime numbers less than ten million
length(primes(1e8)) # 5761455 prime numbers less than one hundred million
}
Run the code above in your browser using DataLab