# Asymptotic behavior of $\pi (x)-\frac{x}{\log x}$

What is the asymptotic behavior of the function given below.

$$f(x)=\pi (x)-\frac{x}{\log x}$$

$$f(x)=O(g(x))$$

What can be $g(x)$? Also what is the asymptotic behavior of the $h(x)=f(x)-g(x)$. My point is can we write prime counting function something like this.

$$\pi (x)=a_{1}\frac{x}{\log x}+a_{2}g(x)+a_{3}h(x)+\dots$$

This equals means literally equal not asymptotic equal.

In fact, a better estimate of the prime counting function is $\DeclareMathOperator{\Li}{Li} \Li(x) := \displaystyle\int_2^\infty \frac{\mathrm{d}x}{\log x},$ which can be shown to be $\dfrac{x}{\log x} + \dfrac{x}{(\log x)^2} + \dots + \dfrac{n!x}{(\log x)^{n+1}} (1 + \epsilon(x)),$ with $\epsilon(x) \to 0$ as $x \to \infty$.
It has been shown (in fact, from Hadamard's original complete proof of the prime number theorem) that $\pi(x) = \Li(x) + O(xe^{-a\sqrt{\log x}})$ for some constant $a$. What this means is that $$\pi(x) = \frac{x}{\log x} \sum_{k=0}^{m - 1}{\frac{k!}{(\log x)^k}} + O\left(\frac{x}{(\log x)^{m + 1}}\right)$$ for every $m$.
To complete this story, I'd like to point out that the Riemann Hypothesis is equivalent to $$\pi(x)=\text{Li}(x)+O(\sqrt{x}\log x),$$ which also comes straight from the original residue calculus method of Hadamard and de la Valee Poussin.
• So can't we write something like this? $$\pi (x)=\frac{x}{logx}\sum_{k=0}^{\infty}\frac{k!}{(logx)^{k}}$$ – esege Apr 23 '14 at 9:31