Quoting from the Wikipedia article:
As a consequence of the prime number theorem, one gets an asymptotic expression for the $ n $th prime number, denoted by $ p_n $: $$ p_n \sim n \log n.$$
Can you explain how we get this approximate expression? I understand the number of prime numbers less than or equal to an integer $ N $, denoted as $ \pi(N) $ is approximately: $$ \pi(N) \sim \frac{N}{\log N}. $$
If the $ n $th prime number is approximately $ n \log n $, it implies that there are approximately $ n $ prime numbers less than or equal to $ n \log n $, i.e., $$ \pi(n \log n) \sim n. $$ But substituting $ N $ with $ n \log n $ in the formula of $\pi(N)$ we get $$ \pi(N) \sim \frac{N}{\log N} = \frac{n \log n}{\log (n \log n)} \not\sim n. $$ What am I doing wrong? How can I show that the statement quoted from Wikipedia is correct?
$$\log(n\log n)=\log n+\log\log n=(1+o(1))\log n$$ therefore $$\frac{n\log n}{\log(n\log n)}=\frac{n\log n}{(1+o(1))\log n} =\frac{n}{(1+o(1))}\sim n.$$