Estimate for $n$th prime

A good approximation I have found for $p_{n}$ is

\begin{align} \int_{2}^{n}\log (x \log (x \log (x)))\ dx\\ \end{align}

and seems to be a better estimate than $n \log (n)$.

The error term seems to agree with the asymptotic expansion of Cipolla:

$$p_n=n\log n+n\log\log n-n+n\frac{\log\log n}{\log n}+O(n(\log\log n/\log n)^2)$$

(from this MO thread) where the $O$ term is replaced for a constant (in this case, $-e$).

Perhaps more interestingly, it seems that applying successive $\log$ terms to the integral

\begin{align} &\int_{2}^{n}\log (x)\ dx&\tag{1}\\ &\int_{2}^{n}\log (x \log (x))\ dx &\tag{2}\\ &\int_{2}^{n}\log (x \log (x \log (x)))\ dx &\tag{3}\\ &\int_{2}^{n}\log (x \log (x \dots \log (x)))\ dx &\tag{4}\\ \end{align}

seems to move very slowly towards a better asymptotic. Is this the case?

Added

Numerical results at @RghtHndSd's request:

Firstly comparing $\color{blue}{n \log (n)},\ \color{green}{\int_{2}^{n}\log (x \log (x \log (x)))\ dx}$ and $\color{red}{p_{n}}$ at successive powers of $10$

enter image description here

with

p[x_] := Round@(x Log[x])
p3[x_] := Round@NIntegrate[Log[n Log[n Log[n]]], {n, 2, x}]
Grid[tab2 = Table[{Style[p[n], FontColor -> Blue],
Style[p3[n], FontColor -> Darker@Green],
Style[Prime[n], FontColor -> Red]}, {n, Table[10^j, {j, 1, 12}]}],
ItemSize -> All, Alignment -> Left]

and then comparing successive $\log$ terms

enter image description here

with

p1[x_] := Round@NIntegrate[Log[n], {n, 2, x}]
p2[x_] := Round@NIntegrate[Log[n Log[n]], {n, 2, x}]
p3[x_] := Round@NIntegrate[Log[n Log[n Log[n]]], {n, 2, x}]
p4[x_] := Round@Re@NIntegrate[Log[n Log[n Log[n Log[n]]]], {n, 2, x}]
p5[x_] := Round@Re@NIntegrate[Log[n Log[n Log[n Log[n Log[n]]]]], {n, 2, x}]
Grid[tab2 = Table[{p1[n], p2[n], p3[n], p4[n], p5[n]}, 
{n, Table[10^j, {j, 1, 12}]}], ItemSize -> All, Alignment -> Left]

which, although p5[n] exceeds $p_{n}$ at $10^{12}$, the successive log terms added to the integral clearly approach a limit near to the asymptote of $p_{n}$. This is not as good, I think, as $\operatorname{li}^{-1}(n)$, but this is difficult to compute for large $n$.

Improved results

It may be that

\begin{align} &\int_{2}^{n}\log (x \log (x \log (x)/e))\ dx\\ \end{align}

is better.

enter image description here

\begin{align} && \text{left hand column}&\quad\left|1-n \dfrac{\log(n)}{p_{n}}\right|&\\ \\ && \text{middle column}&\quad\left|1-\dfrac{\int_{2}^{n}\log (x \log (x \log (x)))\ dx}{p_{n}}\right|&\\ \\ && \text{right hand column}&\quad\left|1-\dfrac{\int_{2}^{n}\log (x \log (x \log (x)/e))\ dx+\frac{9}{2}\sqrt{n}}{p_{n}}\right|&\\ \end{align}

running from $10^{1}$ to $10^{12}$.

Minor improvements

As daniel says, it is likely there are a lot of trailing terms. The best I have been able to manage so far is

\begin{align} &\int_{2}^{n}\log (x \log (x \log (x)/e))\ dx+4 \sqrt{x}+\frac{x}{23 \log ^2(x)}+\frac{x}{23 \log (x)}+\frac{\sqrt{x}}{23 \log (x)}\\ \end{align}

but it is only really accurate up to $10^{11}$

enter image description here

enter image description here

which can be seen to tail off just after $10^{11}$.

pbs[x_] :=  Re@NIntegrate[Log[n Log[n Log[E^E, n]]], {n, 2, x}] 
+ 4 Sqrt[x] + Sqrt[x]/(23 Log[x]) + x/(23 Log[x]) + x/(23 Log[x]^2)

GraphicsGrid[{
Table[ListLinePlot[Transpose@Table[{(pbs[n] - Prime[n])
/(30 Sqrt[n]/Log[n])}, {n, 2, 10^k, 10^(k - 1)/2}]], {k, 2, 4}],
Table[ListLinePlot[Transpose@Table[{(pbs[n] - Prime[n])
/(30 Sqrt[n]/Log[n])}, {n, 2, 10^k, 10^(k - 1)/2}]], {k, 5, 7}],    
Table[ListLinePlot[Transpose@Table[{(pbs[n] - Prime[n])
/(30 Sqrt[n]/Log[n])}, {n, 2, 10^k, 10^(k - 1)/2}]], {k, 8, 10}],    
Table[ListLinePlot[Transpose@Table[{(pbs[n] - Prime[n])
/(30 Sqrt[n]/Log[n])}, {n, 2, 10^k, 10^(k - 1)/2}]], {k, 11, 12}]}, ImageSize -> 1000]]

adding more log terms will only increase the value of the integral.as it is the value of your integral exceeds the value of the nth prime. what is more the error seems to be getting greater as pn gets larger. I strongly suspect that further numerical results will be in favour of PNT, even an asymptotic relation I think, will not hold. However under certain lower and upper bounds the estimate may be better than PNT.