Why is $p_n \sim n\ln(n)$? I know that the prime number theorem states that the number of primes less than $x$ is approximately $\frac{x}{\ln(x)}$. However, why does this mean that $p_n \sim n\ln(n)$? (where $p_n$ is the $n$-th prime). If we replace $x$ with $p_n$ in the original equation, we have that $\pi(p_n) \ln({p_n})\sim p_n$, and $\pi(p_n)$ is just $n$, but what about the $\ln({p_n})$?

An elementary proof. Let $p_n=k_n n \ln n.$ We have $$1\sim \frac {n-1}{n}=\frac {\pi (p_n)}{n}\sim \frac {p_n}{n\ln p_n}=$$ $$=\frac {k_n n\ln n}{n\ln k_n+n\ln n n+n\ln\ln n}=$$ $$=\frac {k_n}{\frac {\ln k_n}{\ln n}+1+\frac {\ln\ln n}{\ln n}}=^{def}W_n.$$
(1).  When  $k_n\ge 1$ we have  $W_n= \frac {k_n}{o(k_n)+1+o(1)}.$  Since $W_n\sim 1$, this implies $ \lim\sup_{n\to\infty}k_n\le 1.$
(2a). If $|\ln k_n|=o(\ln n)$ then when $k_n<1$ we have $W_n=\frac {k_n}{1+o(1)},$ which, since $W_n\sim 1$ and $\lim\sup_{
n\to\infty}k_n\le 1$ from (1), implies $\lim\inf_{n\to\infty}k_n\ge 1.$
(2b).The other alternative $|\ln k_n|\ne o(\ln n)$ for $k_n<1$ would imply (since $\lim\sup_{n\to\infty}k_n\le 1$) that for some $c>0$  there are infinitely many $n$ for which $(-\ln k_n)=|\ln k_n|>c\ln n$ and hence $k_n<n^{-c}.$ But for such $n$ we would have $p_n=k_n n \ln n<n^{1-c}\ln n,$ and we have $\ln n<n^c$ for all sufficiently large $n,$ so we would have $p_n<n$ for some $n\ge 1$, which is absurd. So this alternative is impossible.
Remark. $W_n\sim 1$ is by itself insufficient to prove $k_n\to 1.$ We must, as in (2b), use the relation between $k_n$ and $p_n$ and the fact that $p_n>n. $
