# find a continuous function mapping primes? [closed]

The prime number theorem gives an increasingly (proportionally) accurate approximation for the number of primes less than a given integer $n$.

Can we use this to find an equally accurate approximation which maps the $k$th prime number to its value $p$?

On the x axis should be the number of primes below $n$, $\frac{n}{log(n)}$ and the y axis the value of the number, $p$. So this is the inverse function for $\frac{n}{log(n)}$.

So would the value of the $k$th prime number be approximately $p \approx \frac{k}{\log k}$?

Formula's using any principle other than the PNT are also welcome.

## closed as unclear what you're asking by Did, Daniel W. Farlow, Lee Mosher, Shailesh, user299912 Jul 28 '16 at 8:27

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• You might want to repost the question you are really asking, which is simply: What is the inverse function of $x\mapsto\frac{x}{\log x}$? To which an answer is: Check Lambert W-function. – Did Jul 27 '16 at 9:59
• What do you mean by "maps the $x$th prime number to its size"??? – barak manos Jul 27 '16 at 10:23

Well, the Prime Number Theorem says that, where $g(x)=\frac{x}{\ln x}$, the $g(N)$th prime is approximately $N$. So the function you are looking for is $f(x)=g^{-1}(x)$. I don't know of any easy way to find the inverse of $g(x)$.
Asymptotically, however, we have $f(x)=O(x \ln x)$. This can be seen by letting $f(x)=x (\ln x + h(x))$, for some function $h$. We know that $x=f(\frac{x}{\ln x})$; substituting in the expression for $f$ yields $x=\frac{x}{\ln x}\left(\ln\frac{x}{\ln x} + h\left(\frac{x}{\ln x}\right)\right) = \frac{x}{\ln x}\left(\ln{x} - \ln \ln x + h\left(\frac{x}{\ln x}\right)\right)$. When this is simplified, we get that $h\left(\frac{x}{\ln x}\right) = \ln \ln x$. It should be clear now that the growth of $h(x)$ is slower than that of $\ln x$ (you can see this by plugging in $h(x)=c\ln x$ and getting that $h$ grows too fast to satisfy the equality). Thus, $f(x)=x (\ln x + h(x))$ is $O(x \ln x)$.
• I will accept this answer if you put a proof as to why the growth is $O(xln(x))$ – Dis-integrating Jul 27 '16 at 16:50
• Simpler: $g(2x\log x)=2x/(1+r(x))$ with $r(x)=(\log\log x+\log2)/\log x\to0$ hence $g(2x\log x)>x$ for every $x$ large enough, that is, $f(x)<2x\log x$. – Did Jul 27 '16 at 23:15