Possible Duplicate:
Is there a known mathematical equation to find the nth prime?
Is there a function, like f(n), I insert n into the function and it outputs nth prime number? I have been trying to find a pattern between the prime numbers, 1st differences, 2nd differences, but I can't find it.
To be clear: I want something like f(x)=x^2+5 or f(x)=2.sin(x)+x^2. You know what I mean...
Less obnoxiously, you have to be more specific about the form of the function you're looking for. Closed-form expressions exist but are pretty computationally useless, usually relying on something like Wilson's theorem to function as a characteristic function for the primes.
– Cam McLeman Jan 02 '12 at 16:47