I'm wanting to write a computer program using Python that involves prime numbers. It will ask the user for the i^th prime he/she would like to find. For example, if i = 7, it would return 17 (17 is the 7th prime number), for i = 23 it would be 83 (83 is the 23rd prime number). I would like to do this for i in range(1,1000). I was thinking I could use the approximation sqrt(n)/ln(sqrt(n)) within the program. Given some i, the program could generate a range(2,n) and start checking for primality of numbers within that range. Each m in (2,n) that is prime would be given an index i and the program would continue to run until i = "user input number". When i="user input number" it would return the m in (2,n) assigned to that particular index i. So how can I solve for (or approx.) n in the expression: sqrt(n)/ln(sqrt(n)) = x? Or is there a much easier and better way to go about doing this? I'm just starting to learn programming using the MIT OpenCourseWare site. This isn't for school. It's just for the fun of it! Any suggestions?
closed as off topic by Bruce Westbury, Felipe Voloch, Emil Jeřábek, Todd Trimble, Igor Rivin Oct 20 2011 at 19:51