2

I just read several old threads on here with people asking about formulas for primes, and what the implications of having one would be. As everyone was quick to point out, we already have a bunch, in a manner of speaking. (I've seen all the links and pages and common formulas, don't bother relinking.) Anyway, my question is the one I was surprised not to see:

Will we ever have a closed-form, efficient formula or algorithm for determining the $n$th prime?

I really haven't seen much discussion on this; maybe it's because people just don't know, but I'd be very interested to hear people's opinions on this. My gut feeling is that a nice, exact formula cannot exist, for a variety of hand-wavy reasons; my guess is that we'll continue to make progress (proving GRH will help), and conceivably it'll be a scenario where we can come up with complicated but direct formulae that have arbitrarily small error margins, but my hunch is that the primes' combinatorial complexity is too fully baked into math itself to allow for an exact formula, and there will ultimately be a Godel-type self-reference problem preventing it.

And to be more precise... well, I'm not sure offhand what a reasonable big-O value would be to cite as a target, so instead, when I say "efficient," let's say it's getting to the point where arbitrarily large primes are easy enough to generate that keeping track of a world record prime no longer makes sense to do. So if anyone has thoughts (or better yet, evidence) that it should or should not be theoretically possible one day to really nail down the primes, please share.


So as to avoid this being an "opinion" question, let me point out that if anyone can say with some authority either that a) this is possible, b) this is not possible, or c) nobody has any idea yet, that'll be sufficient for an answer.

Trevor
  • 6,022
  • 15
  • 35

1 Answers1

1

Other than computing the first $n$ primes, probably not. Gaps between primes are (pretty much) completely random, as shown by the success of Cramer's model. Asking if we will ever have an efficient formula to compute the $n$th prime is basically asking if P=NP, which most serious mathematicians and computer scientists believe is false.

K.defaoite
  • 12,536