Divergence of $\sum\limits_{n=1}^{\infty} \frac{\cos(\log(n))}{n}$

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?


For every $k$, define $$N_k=\lceil\exp(2k\pi-\pi/3)\rceil\qquad M_k=\lfloor\exp(2k\pi+\pi/3)\rfloor$$ Then, for every $k$ and every $N_k\leqslant n\leqslant M_k$, $$2\cdot\cos(\log n)\geqslant1$$ hence $$ 2\sum_{n=N_k}^{M_k}\frac{\cos(\log n)}n\geqslant\sum_{n=N_k}^{M_k}\frac1n\geqslant(M_k-N_k)\frac1{M_k}=1-\frac{N_k}{M_k} $$ Now, when $k\to\infty$, $$\frac{N_k}{M_k}=\mathrm e^{-2\pi/3}+o(1)$$ hence $$2\sum_{n=N_k}^{M_k}\frac{\cos(\log n)}n\geqslant1-\mathrm e^{-2\pi/3}+o(1)$$ Can you finish?


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}) $$