Who discovered the first explicit formula for the n-th prime?

Here is something that I have established a long time ago. It doesn't answer your question directly, but rather illustrates the fact that one can easily establish such formula (the one below is given by $P_n$). The real challenge is to establish a prime-formula which is not "computationally worthless".


Is $n$ prime:

$$F_n=\left\lfloor\frac{\left(\sum\limits_{k=2}^{n-1}\left\lceil\frac{{n}\bmod{k}}{n}\right\rceil\right)+2\cdot\left\lceil\frac{n-1}{n}\right\rceil}{n}\right\rfloor$$


How many primes until $n$:

$$G_n=\sum\limits_{k=2}^{n}F_k$$


What is the $n$th prime number:

$$P_n=\sum\limits_{k=n}^{n^2+1}{k}\cdot{F_k}\cdot\left(1-\left\lceil\frac{(G_k-n)^2}{(G_k+n)^2}\right\rceil\right)$$


There are many formulas for the $n$th prime. The only really useful ones are in the form of fast computer programs (yes, those are formulas too, just not what you would normally consider a "closed-form" formula of elementary functions).

Consider the formula in question here,

enter image description here

Observe that in order to find the $n$th prime, this formula requires you to compute $2^n$ terms of the sum. Hence as an algorithm it is of order $\Omega(2^n)$, which is pretty bad.

In addition to the question The myth of no prime formula? already cited in a comment, see the following

  • What would be the immediate implications of a formula for prime numbers

  • Any formula for the exact number of primes below a given bound

  • Can insight be derived from direct formulae for prime number functions

  • Formula for the nth prime number: discovered?