I'm inspired in [1] to ask the following question. My problem is that I have not an implementation of the inverse of the logarithmic integral $\operatorname{Li}(x)=\int\_2^x\frac{dt}{\log t}$, that will be denoted in this post as $$\operatorname{ali}(x)$$ for real numbers $x\geq 2$.



> 
> **Question.** A) Do you know a site or article showing a graph for $$p\_n-\operatorname{ali}(n)$$
>  for integers $1\leq n\leq N$ for samples of the integer $N$ enough large ($N=10^3$, $N=10^6$ and/or $N=10^9$)? In case that isn't in the literature can you show a such of these graphs for $N$ a large integer?
> 
> 
> B) Do you know if it is possible to prove that the sign of the graph for $$p\_n-\operatorname{ali}(n)$$ changes infinitely often when $1\leq n$ runs over positive integers? **Many thanks.**
> 
> 
> 


I don't know if the second question is obvious from Littlewood's theorem (see [2]), or it is required to add details.


References:
-----------


[1] Juan Arias de Reyna and Jérémy Toulisse, *The* $n$-th *prime asymptotically*, Journal de Théorie des Nombres de Bordeaux, Volume: 25, Issue: 3 (2013).


[2] [The section *Skewes's\_numbers*](https://en.wikipedia.org/wiki/Skewes%27s_number#Skewes's_numbers) from the Wikipedia *Skewes's number*.



The graph and sign of $p_n-\operatorname{ali}(n)$, where $p_n$ is the $n$-th prime and $\operatorname{ali}(n)$ the inverse of the logarithmic integral
The answer to (B) is yes, at least conditionally. The sign of $p\_n-\mathop{\rm ali}(n)$ is determined by the sign of $\pi(p\_n) - \mathop{\rm li}(p\_n)$ (other than the negligible possibility that one equals $0$ while the other is tiny and nonzero). The logarithmic density of those primes $p$ for which $\pi(p) > \mathop{\rm li}(p)$ is known, conditionally, to be strictly between $0$ and $1$, which in particular implies infinitely many sign changes. See [my paper "Primes in prime number races" with Lichtman and Pomerance](http://www.math.ubc.ca/~gerg/index.shtml?abstract=PPNR).


Since $\pi(x)-\mathop{\rm li}(x)$ is unconditionally known to change sign infinitely often, it would be interesting to try to prove the OP's statement unconditionally. We certainly used more than the existence of sign changes: we used the fact that for almost all $x$, the difference is not very close to $0$ (which is implicit in the existence of the limiting logarithmic distribution of the normalized difference).


