Density of primes among the prime powers

The argument below is not elegant, but it works.

The number of perfect powers below $x$ is easily bounded by $ \sum_{n = 2}^{\log_2 x} \lfloor x^{1/n} \rfloor \le x^{1/2} \log x$.

On the other hand the number of primes below $x$ is about $x/\log x$.

Bounding the number of prime powers (including primes) by the number of primes plus the number of perfect powers, the claim follows.


We can observe that if $p^{n}\leq x$ then $p\leq x^{1/n}$ so we can write $$\Pi\left(x\right)=\pi\left(x\right)+\pi\left(x^{1/2}\right)+\dots+\pi\left(x^{1/n}\right) $$ hence $$\Pi\left(x\right)=\pi\left(x\right)+O\left(\frac{\sqrt{x}}{\log\left(x\right)}\right).$$