Work out nth prime number instantly with clear inputs, formula shown and shareable results.
The primes are generated with the sieve of Eratosthenes, sized using the estimate pₙ ≈ n(ln n + ln ln n) so the sieve is guaranteed to be large enough.
Prime counting estimate
pₙ ≈ n(ln n + ln ln n)
541. The 1000th is 7919.
On average yes, roughly like ln p, but they fluctuate wildly and twin primes (gap 2) appear arbitrarily far out, conjecturally forever.