title: Is there a way to find the approximate value of the nth prime?
body: <p>Is there a function which will return the approximate value of the <em>n</em> th prime? I think this would be something like an approximate inverse prime counting function. For example, if I gave this function 25 it would return a number around 100, or if I gave this function 1000 it would return a number around 8000. I don't care if the number returned is prime or not, but I do want it to be fast (so no generating the first <em>n</em> prime numbers to return the <em>n</em> th.)</p>
  
  <p>I would like this so that I can generate the first <em>n</em> prime numbers using a sieve (<a href="http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes" rel="noreferrer">Eratosthenes</a> or <a href="http://en.wikipedia.org/wiki/Sieve_of_Atkin" rel="noreferrer">Atkin</a>). Therefore, the approximation for <em>n</em> th the would ideally never underestimate the value of the actual <em>n</em> th prime.</p>
  
  <p>(Update: see <a href="https://stackoverflow.com/questions/1042717/is-there-a-way-to-find-the-approximate-value-of-the-nth-prime/1069023#1069023">my answer</a> for a good method of finding the upper bound of the <em>n</em> th prime number.)</p>