# Proving $\sum\limits_{k=1}^{\pi(n)-1} [ \theta(p_k) (1/{p_k}-1/p_{k+1})] -\ln(n)$ converges

Prove the sequence $a_n$ defined by $a_n = \sum\limits_{k=1}^{\pi(n)-1} [ \theta(p_k) (1/{p_k}-1/p_{k+1})] -\ln(n)$ converges, where $p_k$ denotes the $k$-th prime and $\vartheta(x)$ is Chebyshev's theta function.

-
Why? Is this your homework? Is it something you read somewhere? Is it a conjecture of yours? Are we allowed to use the Prime Number Theorem? Is this just an exercise in summation by parts? –  Gerry Myerson Jun 5 '11 at 13:10
Apply summation by parts. Then you will get something which looks like $$\sum_{p\leq x} \frac{\log p}{p}.$$ This sum is equal to $$\log x +C+O\left(e^{-c\sqrt{\log x}}\right)$$ using partial summation an the quantitative prime number theorem.