This is an attempt to rescue the deleted question https://math.stackexchange.com/questions/4389184/relations-between-psix-pix-operatornamelix-and-fracx-ln and its answer which, I believe, has valuable mathematical content.
First, some notation (standard from Analytic Number Theory):
- $\psi(x)=\sum_{n\le x}\Lambda(n)$
- $\Lambda(n)=\log p$ if $n$ is a power of a prime $p$; otherwise, zero.
- $\pi(x)$ is the number of primes not exceeding $x$.
- $\displaystyle{\rm li}(x)=\int_2^x{dt\over\log t}$
a. Assuming that $\psi(x)=x+O(x^{1-\epsilon})$ for some $\epsilon\in\left(0, \frac{1}{2}\right)$, I need to find $\delta=\delta(\epsilon)$ such that $\pi(x)-\operatorname{li}(x)=O(x^{1-\delta})$.
b. I need to show that $\pi(x)-\frac{x}{\log x}\neq O(x^{1-\delta})$ for any $\delta\gt0$
Something like this is done in Davenport, Multiplicative Number Theory, pp. 112-3, where it's shown how to get from $$|\psi(x)-x|\ll x\exp(-c_2(\log x)^{1/2})$$ for a certain constant $c_2<1$, to $$\pi(x)={\rm li\ }x+O(x\exp(-c_3(\log x)^{1/2})$$ where $c_3=c_2/2$. But I don't see how to use Davenport's argument to solve the question I'm asking.
[This answer was posted by LurchiDerLurch to the original question, and was automatically deleted when that question was deleted. Lurchi, feel free to post your work yourself as an answer, at which point I'll delete this.]
Part a) is essentially a consequence of partial summation. Let $\tilde \pi(x)$ be the function counting potencies of primes, i.e. $$\tilde \pi(x) = \sum_{n \leq x} \Lambda(n) = \sum_{p^e \leq x} \log p.$$ Note that one trivially has $\pi(x) - \tilde \pi(x) = O(\sqrt x),$ as for each $p$, there are at most $\log_2(x) = O(\log(x))$ many potencies of $p$ up to $x$, and there are only $\pi(\sqrt x) = O(\sqrt x/\log(x))$ many primes up to $x$ for which $p^2 \leq x$. Partial summation yields $$ \tilde \pi(x) = \sum_{n \leq x} \frac {\Lambda(n)}{\log(n)} = \frac {\psi(x)}{\log(x)} + \int_1^x \frac{\psi(t)}{t (\log t)^2} dt.$$
If we now assume that $\psi(x) = x + O(x^{1-\epsilon})$, we obtain (using that $\int_1^x dt/\log t^2= li(x) - x/\log x$) that $$ \tilde \pi(x) = li(x) + O \left(\int_2^x (t^\epsilon \log(t)^2)^{-1} dt \right) + O\left(\frac{x^{1-\epsilon}}{\log x} \right). $$ The integral is readily seen to be of size $O(x^{1-\epsilon})$, or with a little more care evaluated to $O(\frac{x^{1-\varepsilon}}{\log x})$.
Concludingly, this shows $\pi(x) = li(x) + O(\frac{x^{1-\epsilon}}{\log x})$ if we assume $\psi(x) = x + O(x^{1-\varepsilon}).$
For part b) use that there is some $C > 0$ such that $li(x)-x/\log(x) > C x/(\log x)^2$ infinitely often. One version of the prime number theorem states that $\pi(x) - li(x) = O(\frac x{(\log x)^A})$ for any $A > 0$. In particular, we have $$\pi(x) - \frac x{\log x} = (\pi(x) - li(x)) + (li(x) - \frac x{\log x}) > o(\frac x {\log^2 x}) + C \frac x{\log^2 x}$$ for infinitely many $x$, which even shows that $\pi(x) \neq \frac x{\log x} + O(\frac x {\log ^3 x})$.
[OP then commented,]
The only thing I didn't understand is why $\pi(x)-\tilde\pi(x)=O(\sqrt x)$. I know that $\tilde\pi(x)-\pi(x)=(1/2)\pi(\sqrt x)+(1/3)\pi(\root3\of x)+\cdots\le(1/2)\sqrt x+(1/3)\root3\of x+\cdots$, but I don't understand why it is in $O(\sqrt x)$. My problem is that it is an infinite sum.
[Lurchi replied,]
You are almost there. Note that $\pi(\root n\of x)=0$ if $\root n\of x<2$, i.e. if $n>\log x$. Now you can trivially estimate $\pi(\root n\of x)$ and just bound the sum by $\log x\,\pi(\sqrt x)$.