In [this MO question](https://mathoverflow.net/questions/149011/order-of-magnitude-of-sum-frac1-logp), it says that we have


$$ \sum\_{p<n} \frac{1}{\log{p}} =\frac{n}{\log^2 n}+O\left(\frac{n\log\log n}{\log^3 n}\right).$$


where the sum is on all primes $p$, up to some max prime $n$. This is derived from the prime number theorem.


My question is, does there exist a similar result for the order of magnitude of the sum of the logarithms of primes, squared?


$$ \sum\_{p<n} \frac{1}{\log^2{p}} = ?$$


Or, when raised to an arbitrary power, let's say $a$?


$$ \sum\_{p<n} \frac{1}{\log^a{p}} = ?$$


I would be happy to get an analogous result for either of these.



Order of magnitude of $\sum \frac{1}{\log^2{p}}$, or $\sum \frac{1}{\log^a{p}}$ for arbitrary power $a$
For $a > 0$, partial summation yields $$\sum\_{p \leq x} \frac{1}{\log^a{p}} = \frac{\pi(x)}{\log^a x} + a \int\_2^x \frac{\pi(t)}{t \log^{a+1} t} \,dt.$$ The first term is $\frac{\text{li(x)}}{\log^a x} + O\left(\frac{x}{\log^a x}e^{-c \sqrt{\log x}}\right)$ by the prime number theorem.


Cut the integral in half : $$\int\_2^x \frac{\pi(t)}{t \log^{a+1} t} \,dt = \int\_2^{\sqrt x} \frac{\pi(t)}{t \log^{a+1} t} \,dt + \int\_{\sqrt x}^x \frac{\pi(t)}{t \log^{a+1} t} \,dt.$$ The first one is clearly $O(\sqrt{x})$, while the second is $$O\left( \frac{1}{\log^{a+1}(x)} \int\_{\sqrt x}^x \frac{\pi(t)}{t} \,dt\right) = O\left( \frac{1}{\log^{a+1}(x)} \int\_{\sqrt x}^x \frac{dt}{\log t}\right) = O\left(\frac{\text{li(x)}}{\log^{a+1}(x)}\right).$$


In the end, $$\sum\_{p \leq x} \frac{1}{\log^a{p}} = \frac{\text{li(x)}}{\log^a x} + O\left(a \frac{\text{li(x)}}{\log^{a+1}(x)}\right).$$


One could probably get a better second term by using integration by parts in a more clever way.


