TITLE: Divergence of $\sum\limits_{n=1}^{\infty} \frac{\cos(\log(n))}{n}$
QUESTION [11 upvotes]: I'm struggling to prove that $$\sum \limits_{n=1}^{\infty} \frac{\cos(\log(n))}{n}$$ diverges. 
Does anyone have any idea how to prove it? Breaking it into smaller pieces din't work. Maybe I should bound it with another series? But how?

REPLY [8 votes]: Let
$$B_{1}(x) = x - \lfloor x \rfloor - \frac{1}{2}$$
be the periodic Bernoulli polynomial of order 1. Using Riemann-Stieltjes integral,
\begin{align*}
\sum_{n=1}^{N} \frac{1}{n^{1+i}}
&= \int_{1^{-}}^{N} \frac{d[t]}{t^{1+i}}
 = \int_{1}^{N} \frac{dt}{t^{1+i}} - \int_{1^{-}}^{N} \frac{dB_{1}(t)}{t^{1+i}} \\
&= \frac{i}{N^{i}} - i - \left[ \frac{B_{1}(t)}{t^{1+i}} \right]_{1^{-}}^{N} - (1 + i)\int_{1}^{N} \frac{B_{1}(t)}{t^{2+i}} \, dt \\
&= \frac{i}{N^{i}} + \frac{1}{2N^{1+i}} - i + \frac{1}{2} - (1 + i)\int_{1}^{N} \frac{B_{1}(t)}{t^{2+i}} \, dt \\
&= \frac{i}{N^{i}}- i + \frac{1}{2} - (1 + i)\int_{1}^{\infty} \frac{B_{1}(t)}{t^{2+i}} \, dt + O(N^{-1}). \tag{*}
\end{align*}
Taking real parts, we find that for some constant $c$,
$$ \sum_{n=1}^{N} \frac{\cos\log n}{n} = \sin\log N + c + O(N^{-1}). $$
Therefore the sum diverges as $N \to \infty$. In fact, a more detailed investigation shows that the constant part of the estimation $\text{(*)}$ equals $\zeta(1+i)$, where $\zeta(s)$ is the Riemann zeta function. Therefore we have
$$ \sum_{n=1}^{N} \frac{1}{n^{1+i}} = \frac{i}{N^{i}} + \zeta(1 + i) + O(N^{-1}) $$
and likewise
$$ \sum_{n=1}^{N} \frac{\cos\log n}{n} = \sin\log N + \Re\zeta(1 + i) + O(N^{-1}) $$