Is there any work that n will return the prime minister's estimated value? I think this would be something like an approximate inverted main count function. For example, if I give this function 25, then it will return a number around 100, or if I give this function 1000, then it will return a number around 8000. I do not care if the return number is dominant or not, but I want it to be fast (hence n do not generate major numbers before n I like it so that I can generate the first n primary numbers by using a sieve (or), n th For approximation, ideally, the value of the actual n does not consider reducing the value of the principal. (Update: For a good method, see n to find the upper limit of the prime number.) Strict range: Fixed priceless small primes_small [] = {0,2,3,5,7,11}; Steady unsigned long nth_prime_upper (unsigned long n) {double fn = (double) n; Double flogn, flog2n, upper; If (n & lt; 6) returns primes_small [n]; Flagon = log (n); Flog...