I'm writing a program that finds the nth prime number, so if n was 10, the answer would be 29. I need to find an upper bound to search through though so if n was 10, the upper bound would be 30 (or any number before the next prime number which is 31).
Any ideas?
http://math.stackexchange.com/questions/507178/most-efficient-algorithm-for-nth-prime-deterministic-and-probabilistic and http://math.stackexchange.com/questions/1411346/how-do-i-findisolate-the-n-th-prime-number
As they give ideas for how to efficiently implement your actual program (find nth prime) for relatively large inputs.
– DanaJ Oct 12 '15 at 22:42