Hello,


I am wondering if there is a simple asymptotic formula for


$$\sum\_{p\leq x}\frac{\left(\log p\right)^{k}}{p},$$


where $k\geq0$ is some integer. If $k$ is $0,$ by using the Prime Number Theorem we have 


$$\sum\_{p\leq x}\frac{1}{p}=\log \log x+b+O\left(e^{-c\sqrt{\log x}}\right).$$


Similarly, the prime number theorem and integration by parts solves the case $k=1$ and gives 


$$\sum\_{p\leq x}\frac{\left(\log p\right)}{p}=\log x+C+O\left(e^{-c\sqrt{\log x}}\right).$$ 


My question is do these integrals have a nice asymptotic formula for every $k$? Specifically, I mean with an error term of the form $O\left(e^{-c\sqrt{\log x}}\right).$


Thanks!


Remark: [This question](https://mathoverflow.net/questions/64857/evaluating-the-sum-sum-p-leq-x-alpha-fracx-p-log-leftx-p-right) is related, and in particular if it is solved with a nice enough asymptotic, then so is this. (but not vice versa)



Asymptotic Formula for a Mertens Style Sum
Expanding on Frank's answer: by partial summation, we have that
$$\sum\_{p \leq x} \frac{(\log p)^k}{p} = \frac{(\log x)^k}{x} \pi(x) - \int\_{2}^{x} \pi(t) \left(\frac{kt (\log t)^{k-1} - (\log t)^k}{t^2}\right) dt.$$
Using the fact that $\pi(x) = \mathrm{Li}(x) + E(x)$, where $E(x) = O(e^{-c\sqrt{\log x}})$, we have that the first term is equal to
$$\frac{(\log x)^k}{x} \mathrm{Li}(x) + O((\log x)^k e^{-c\sqrt{\log x}}) = \frac{(\log x)^k}{x} \mathrm{Li}(x) + O(e^{-c\_k \sqrt{\log x}}).$$
For the second term,
$$- \int\_{2}^{x} \pi(t) \left(\frac{kt (\log t)^{k-1} - (\log t)^k}{t^2}\right) dt = R\_1(x) + R\_2 + R\_3(x),$$
where
$$R\_1(x) = - \int\_{2}^{x} \mathrm{Li}(t) \left(\frac{kt (\log t)^{k-1} - (\log t)^k}{t^2}\right) dt,$$
$$R\_2 = - \int\_{2}^{\infty} E(t) \left(\frac{kt (\log t)^{k-1} - (\log t)^k}{t^2}\right) dt,$$
$$R\_3(x) = \int\_{x}^{\infty} E(t) \left(\frac{kt (\log t)^{k-1} - (\log t)^k}{t^2}\right) dt.$$
Let's look at $R\_1(x)$ first. Using the fact that $\mathrm{Li}(t) = \int\_{2}^{s} \frac{ds}{\log s}$ and interchanging the order of integration, then evaluating the integral with respect to $t$, we obtain
$$R\_1(x) = - \frac{(\log x)^k}{x} \mathrm{Li}(x) + \frac{(\log x)^k}{k} - \frac{(\log 2)^k}{k}.$$
For $R\_3(x)$, a simple calculation shows that
$$R\_3(x) \ll - \int\_{x}^{\infty}{(\log t)^{k-1} e^{-c\sqrt{\log t}} \left(\frac{kt - \log t}{t^2}\right) dt} = - \int\_{\log x}^{\infty}{u^{k-1} e^{-c\sqrt{u}} \left(\frac{ke^{u} - u}{e^u}\right) du}.$$
We can rewrite this integral as
$$- \int\_{\log x}^{\infty}{\left(ku^{k-1} e^{-c\sqrt{u}} - \frac{c}{2} u^{k - 1/2} e^{-c\sqrt{u}}\right) + \left(\frac{c}{2} u^{k - 1/2} e^{-c\sqrt{u}} - u^k e^{-c\sqrt{u} - u}\right) du}$$
and from this it is clear that
$$R\_3(x) \ll\_k - \int\_{\log x}^{\infty}{\left(ku^{k-1} e^{-c\sqrt{u}} - \frac{c}{2} u^{k - 1/2} e^{-c\sqrt{u}}\right) du} = (\log x)^k e^{-c \sqrt{\log x}} \ll e^{-c\_k \sqrt{\log x}}.$$
Finally, it's clear from the estimate for $R\_3(x)$ that the integral defining $R\_2$ converges, and so we obtain
$$\sum\_{p \leq x} \frac{(\log p)^k}{p} = \frac{(\log x)^k}{k} - \frac{(\log 2)^k}{k} + R\_2 + O\_k(e^{-c\sqrt{\log x}}).$$


Note that it's possible to make this valid for much more than just nonnegative integers $k$ - you could also have $k$ complex.


