Is the following statement true ?

For each natural number $x\ge2$ , we have $x\le2^{\pi(x)}$, where $\pi(x)$ is the prime-counting function .

It seems true for $x$ is small. As $x$ getting larger then the distance

between two prime numbers possibly getting larger. So is it true for all natural number $x\ge 2$ ? or is there a counterexample ?

Thanks for patient reading and any comment or answer I will be grateful.

## Best Answer

I am very bad with prime numbers; so I shall use algebra.Consider the function $$f(x)=\log \left(2^{\pi (x)}\right)-\log(x)$$ and we know that, for any $x \ge 17$, $\pi (x) > \frac {x}{\log(x)}$ $$f(x) >\frac {x\log(2)}{\log(x)}- \log(x)$$ Consider now the function $$g(x)=\frac {x\log(2)}{\log(x)}- \log(x)$$ Its derivative $$g'(x)=-\frac{1}{x}-\frac{\log (2)}{\log ^2(x)}+\frac{\log (2)}{\log (x)}$$ cancels for $x \approx 5.87$ (numerical method) and for this value $g(x) \approx 0.529$ and the second derivative test shows that this is a minimum.

Is this any good for you ?