Positive logarithmic moments of reciprocal primes (source code)

= Positive logarithmic moments of reciprocal primes
{title2=$\sum_{p\le x}(\log p)^\lambda/p=(\log x)^\lambda/\lambda+O((\log x)^{\lambda-1})$}

For fixed $\lambda>1$, integrate $(\log t)^{\lambda-1}$ against $A(t)=\sum_{p\le t}(\log p)/p$. The <Mertens first theorem> gives $A(t)=\log t+O(1)$. <Partial summation> makes the main integral $(\log x)^\lambda/\lambda$; the bounded error in $A$ contributes at most a constant times $(\log x)^{\lambda-1}$. The restriction $\lambda>1$ ensures that integrating the derivative $(\lambda-1)(\log t)^{\lambda-2}/t$ has this bound.