From prime number theorem, we kmow that $$\pi(x) \sim \frac{x}{log(x)}$$
As you can see, in this graph, $\pi(x)-\frac{x}{log(x)}$ is increasing. My question is is there any function which best represents this curve?
From prime number theorem, we kmow that $$\pi(x) \sim \frac{x}{log(x)}$$
As you can see, in this graph, $\pi(x)-\frac{x}{log(x)}$ is increasing. My question is is there any function which best represents this curve?
In $1979$, Hardy and Wright gave in "An Introduction to the Theory of Numbers" $$\pi(x)=-1+\sum_{n=3}^x \Bigg[(n-2)!-n \left\lfloor \frac{(n-2)!}{n}\right\rfloor\Bigg]$$ which is exact for $x>3$.
For a discussion about bounds, have a look here.
I do not remember where I saw the approximation $$\pi(x) \sim \text{li}\left(x+\sqrt{x}\right)-\text{li}\left(\sqrt{x}+2\right)$$ where $ \text{li}(k)$ is the Eulerian logarithmic integral.
For $x=10^k$ some results $$\left( \begin{array}{ccc} k & \text{approximation} & \text{exact} \\ 1 & 4 & 4 \\ 2 & 25 & 25 \\ 3 & 168 & 168 \\ 4 & 1226 & 1229 \\ 5 & 9586 & 9592 \\ 6 & 78522 & 78498 \\ 7 & 664651 & 664579 \\ 8 & 5761506 & 5761455 \\ 9 & 50847327 & 50847534 \\ 10 & 455050328 & 455052511 \\ 11 & 4118051515 & 4118054813 \\ 12 & 37607907844 & 37607912018 \\ 13 & 346065523621 & 346065536839 \\ 14 & 3204941710984 & 3204941750802 \\ 15 & 29844570438537 & 29844570422669 \\ 16 & 279238341200688 & 279238341033925 \\ 17 & 2623557156605758 & 2623557157654233 \\ 18 & 24739954282968651 & 24739954287740860 \\ 19 & 234057667296624319 & 234057667276344607 \\ \end{array} \right)$$