Convergence and limit of $a_1 - a_2 +a_3-a_4 + \cdots$, where $a_n=\frac{1+\frac{1}{2}+\frac{1}{3} + \cdots +\frac{1}{n}}{n}$ 
For $n=1,2,3,...$, define
$$a_n=\frac{1+\frac{1}{2}+\frac{1}{3} + \cdots +\frac{1}{n}}{n}$$
Consider the series $S= a_1 - a_2 +a_3-a_4 + \cdots $. Prove that the series converges conditionally and what is its limit?

Using Liebnitz test I have proved the convergence of S. Using Comparison test I have proved that S is not absolutely convergent. How do I find the sum of the series S? Thank you for your help.
 A: The series of interest is given by $\sum_{n=1}^\infty \frac{(-1)^{n+1}}{n}H_n$ where $H_n =\sum_{k=1}^n \frac1k$.  Inasmuch as $H_n=\log(n)+\gamma +O(1/n)$, the series converges.  Therefore we can write
$$\begin{align}
\sum_{n=1}^\infty \frac{(-1)^{n+1}}{n}H_n&=\sum_{n=1}^\infty \frac{(-1)^{n+1}}{n}\sum_{k=1}^n \frac1k\\\\
&=\sum_{k=1}^\infty \frac1k \sum_{n=k}^\infty \frac{(-1)^{n+1}}{n}\\\\
&=\sum_{k=1}^\infty \sum_{n=0}^\infty \frac{(-1)^{n+k+1}}{k(n+k)}\\\\
&=\sum_{k=1}^\infty \frac{(-1)^{k+1}}{k^2}-\sum_{k=1}^\infty \sum_{n=1}^\infty \frac{(-1)^{n+k}}{k(n+k)}\\\\
&=\frac{\pi^2}{12}-\sum_{k=1}^\infty \sum_{n=1}^\infty \frac{(-1)^{n+k}}{k(n+k)}\tag1\\\\
&=\frac{\pi^2}{12}-\sum_{k=1}^\infty \sum_{n=1}^\infty \left(\frac{(-1)^{n+k}}{nk}-\frac{(-1)^{n+k}}{n(n+k)}\right)\tag2 \\\\
&=\frac{\pi^2}{12}-\log^2(2)+\sum_{k=1}^\infty \sum_{n=1}^\infty \frac{(-1)^{n+k}}{n(n+k)}\tag3
\end{align}$$



The interchange of the order of summation is straightforward to justify and is left to the reader to verify.  In going from $(1)$ to $(2)$ we used partial fraction expansion.



Now, not that the series on the right-hand side of $(3)$ is identical to the series on the right-hand side of $(1)$ (indices interchanged).  Hence, we see that
$$2\sum_{k=1}^\infty \sum_{n=1}^\infty \frac{(-1)^{n+k}}{k(n+k)}=\log^2(2)$$
from which we find that
$$\bbox[5px,border:2px solid #C0A000]{\sum_{n=1}^\infty \frac{(-1)^{n+1}}{n}H_n=\frac{\pi^2}{12}-\frac12\log^2(2)}$$
And we are done.
A: First of all, the generating function of the harmonic numbers is:
$$\sum_{n\ge1}H_nz^{n-1}=-\frac{\ln(1-z)}{z(1-z)}=-\frac{\ln(1-z)}{1-z}-\frac{\ln(1-z)}z,$$
absolutely convergent for $|z|<1$. Integrating, we obtain:
\begin{align}
\sum_{n\ge 1}\frac1{n}H_nz^n&=-\int_0^z\left[\frac{\ln(1-t)}{1-t}+\frac{\ln(1-t)}{t}\right]dt\\
&=\frac12(\ln(1-z))^2+\int_0^z\frac{\ln(1-t)}tdt\ (|z|<1).\end{align}
Now, taking the limit $z\to-1$, we obtain:
\begin{align}\sum_{n\ge 1}\frac{(-1)^n}nH_n&=\frac12(\ln2)^2+\int_0^{-1}\frac{\ln(1-t)}tdt\\
&=\frac12(\ln2)^2-\frac{\pi^2}{12},\end{align}
where the last integral can be evaluated with the same method as done here.

P.S. The exchange of the limit and integral can be justified as follows.
We have
\begin{align}\sum_{n\ge 1}\frac1n H_n(-1+\varepsilon)^n&=\sum_{k\ge0}\left(\frac1{2k+1}H_{2k+1}(-1+\epsilon)^{2k+1}+\frac1{2k+2}H_{2k+2}(-1+\epsilon)^{2k+2}\right)\\
&=\sum_{k\ge0}\left(\frac1{2k+1}H_{2k+1}-\frac1{2k+2}H_{2k+2}+\epsilon\frac1{2k+2}H_{2k+2}\right)(-1+\epsilon)^{2k+1}.\\
\end{align}
Now, for small enough $\epsilon>0$:
\begin{align}\left|\left(\frac1{2k+1}H_{2k+1}-\frac1{2k+2}H_{2k+2}+\epsilon\frac1{2k+2}H_{2k+2}\right)(-1+\epsilon)^{2k+1}\right|&\le\left(\frac1{2k+1}H_{2k+1}-\frac1{2k+2}H_{2k+2}\right)+\epsilon(1-\epsilon)^{2k+1}\frac1{2k+2}H_{2k+2}\\&\le\left(\frac1{2k+1}H_{2k+1}-\frac1{2k+2}H_{2k+2}\right)+\frac1{(2k+2)^2}H_{2k+2}.\end{align}
Now, denoting the RHS as $a_k$, the sum $\sum a_k$ converges, so by the dominated convergence theorem we can exchange the limit and the sum.
