Strange series that converges I'm trying to evaluate this series
$$S= \sum_{n=2}^{\infty} a_n \frac{\ln (n)}{n}$$
But I have some conditions on $a_n$ making the problem hard. Namely, $a_n=3$ for $n = 2 \mod 4$ and $a_n = -1$ otherwise.
Albeit 2 mod 4 =2 is just a number, a friend in the comments suggested that the 2[mod 4] takes values 2,6,10,... which of course makes sense. Meaning that $a_n$ will go like $(3 -1 -1 -1 +3 -1 -1 -1 +3 + ...)$ for $n=2,3,4 ...$.
I don't really know how to do convergence test when I have constraints on a summation constant like this. I have tried to rewrite the sum to a simpler form, tried to separate is at two sums for the two different $a_n$'s but I don't really know how to do it and there is where I'm stuck...
 A: If we're willing to play a little loose with the fact that this is conditionally convergent, we can use the fact that $3 -1 -1 -1 = (2 + 1) + (-1) + (-2 + 1) - 1$ to split the series into two alternating series:
\begin{multline}
S = \sum_{n=2}^\infty a_n\frac{\ln(n)}{n} = 2\sum_{n=1}^{\infty}(-1)^{n+1}\frac{\ln(2n)}{2n} + \sum_{n=2}^\infty (-1)^n\frac{\ln(n)}{n}
\\= -\ln(2)\sum_{n=1}^\infty \frac{(-1)}{n} - \sum_{n=1}^\infty (-1)^n\frac{\ln(n)}{n} + \sum_{n=2}^\infty (-1)^n\frac{\ln(n)}{n} = \ln^2(2),
\end{multline}
where in the last step we use the result that $\sum_{n=1}^\infty(-1)^n/n = -\ln(2)$.
As for proving the series converges, since $\ln(n)/n$ decreases monotonically, you should be able to use that show that the $\liminf$ and $\limsup$ of the partial sums are equal.
A: I found that the given sequence can be written as
$$a_n = \cos (\pi  n)-\cos \left(\frac{\pi  n}{2}\right)-\cos \left(\frac{3 \pi  n}{2}\right)$$
and
$$\sum _{n=2}^{\infty } \left(\cos (\pi  n)-\cos \left(\frac{\pi  n}{2}\right)-\cos \left(\frac{3 \pi  n}{2}\right)\right)\frac{\ln (n)}{n}=\frac{1}{2} \left(2 \ln^2 2+2 \gamma  \ln 2-2 \gamma  \log 2\right)=\ln^2 2$$
A: As I pointed out in the comments, this is Question B-4 from the 2017 William Lowell Putnam competition.  For convenience, I am providing the first of two solutions provided from the link in my comment.  I take no credit--only minor changes to phrasing were made.
The key insight is to define an auxiliary telescoping series with terms $$a_k = \frac{\log k}{k} - \frac{\log (k+1)}{k+1},$$ for which we trivially have $$\sum_{k=1}^\infty a_k = 0. \tag{1}$$  Since $a_k > 0$ for $k \ge 3$, we also see that $(1)$ is absolutely convergent.
Having constructed such a series permitting rearrangement of its terms, we next observe $$3a_{4k+2} + 2a_{4k+3} + a_{4k+4} = (a_{4k+2} + a_{4k+4}) + 2(a_{4k+2} + a_{4k+3}),$$ hence
$$\begin{align}
S &= \sum_{k=0}^\infty \left(3 \frac{\log(4k+2)}{4k+2} - \frac{\log(4k+3)}{4k+3} - \frac{\log(4k+4)}{4k+4} - \frac{\log(4k+5)}{4k+5}\right) \\
&= \sum_{k=0}^\infty (3a_{4k+2} + 2a_{4k+3} + a_{4k+4}) \\
&= \sum_{k=1}^\infty a_{2k} + \sum_{k=0}^\infty 2(a_{4k+2} + a_{4k+3}). \tag{2}
\end{align} $$
We next observe $$2(a_{4k+2} + a_{4k+3}) = \frac{\log(4k+2)}{2k+1} - \frac{\log(4k+4)}{2k+2} = a_{2k+1} + \left(\frac{1}{2k+1} - \frac{1}{2k+2}\right)\log 2.$$  Hence
$$\sum_{k=0}^\infty 2(a_{4k+2} + a_{4k+3}) = \sum_{k=0}^\infty a_{2k+1} + \log 2 \sum_{k=1}^\infty \frac{(-1)^{k+1}}{k} = \sum_{k=0}^\infty a_{2k+1} + \log^2 2. \tag{3}$$
Finally, putting $(1)$, $(2)$, and $(3)$ together yields the desired result:
$$S = \log^2 2 + \sum_{k=1}^\infty a_{2k} + \sum_{k=0}^\infty a_{2k+1} = \log^2 2 + \sum_{k=1}^\infty a_k = \log^2 2.$$
A: This is not really an answer, but it's too long for a comment. I just wanted to share another possible direction one might take this problem. Our sum is
$$S=\frac{3\ln( 2)}{2} -\frac{\ln( 3)}{3} -\frac{\ln( 4)}{4} -\frac{\ln( 5)}{5} +...$$
But, we can regroup the terms as
$$S=\left(\frac{\ln( 2)}{2} -\frac{\ln( 3)}{3}\right) +\left(\frac{\ln( 2)}{2} -\frac{\ln( 4)}{4}\right) +\left(\frac{\ln( 2)}{2} -\frac{\ln( 5)}{5}\right) +...$$
So,
$$S=\sum_{k=0}^\infty \left[\frac{\ln(4k+2)}{4k+2}-\frac{\ln(4k+3)}{4k+3}\right]+\sum_{k=0}^\infty \left[\frac{\ln(4k+2)}{4k+2}-\frac{\ln(4k+4)}{4k+4}\right]+\sum_{k=0}^\infty \left[\frac{\ln(4k+2)}{4k+2}-\frac{\ln(4k+5)}{4k+5}\right]$$
However using laws of logarithms and shifting our index one may instead state this as
$$S=\ln\left(\prod_{k=1}^\infty \frac{(4k-2)^{4k-2}}{(4k-1)^{4k-1}}\right)+\ln\left(\prod_{k=1}^\infty \frac{(4k-2)^{4k-2}}{(4k)^{4k}}\right)+\ln\left(\prod_{k=1}^\infty \frac{(4k-2)^{4k-2}}{(4k+1)^{4k+1}}\right)$$
The neat thing is that all of these products definitely converge, since they are all monotone increasing and bounded from above by $1$.
These products remind me of the somewhat well known product
$$\prod_{n=1}^\infty \frac{n^{\frac{1}{n}}}{(n+1)^{\frac{1}{n+1}}}=1$$
Perhaps somebody can say something meaningful about products of the form
$$P(a,b,c)=\prod_{k=1}^\infty \frac{(ak+b)^{\frac{1}{ak+b}}}{(ak+c)^{\frac{1}{ak+c}}}$$
I'm quite curious about this.
