If you don't need to go very high, you could write a sieve. Here's a website that allows you to find the nth prime for n up to .
Formula for primes - Wikipedia, the free encyclopedia
This is as close as you can get to a true prime number formula.
Of much interest is also Riemann's "explicit formula"!