# Conjectured value of a harmonic sum $\sum_{n=1}^\infty\left(H_n-\,2H_{2n}+H_{4n}\right)^2$

There is a known asymptotic expansion of harmonic numbers $H_n$ for $n\to\infty$: \begin{align}H_n&=\gamma+\ln n+\sum_{k=1}^\infty\left(-\frac{B_k}{k\cdot n^k}\right)\\ &=\gamma+\ln n+\frac1{2n}-\frac1{12n^2}+\frac1{120n^4}-\frac1{252n^6}\,+\,\dots,\end{align}\tag1 where $B_k$ are Bernoulli numbers. We can take a linear combination of harmonic numbers to cancel constant and logarithmic terms, compensate for $O(n^{-1})$ term, and get the following series that is possible to evaluate in a closed form (e.g. using generating function): $$\sum_{k=1}^\infty\left(H_n-\,2H_{2n}+H_{4n}-\frac1{8n}\right)=\frac18-\frac\pi{16}.\tag2$$ Rather than compensating for $O(n^{-1})$ term, we can take a series with alternating signs, that is also possible to evaluate in a closed form: $$\sum_{n=1}^\infty\,(-1)^n\,\Big(H_n-\,2H_{2n}+H_{4n}\Big)=\frac{3\pi}{16}-\frac\pi{4\sqrt2}-\frac{\ln2}8.\tag3$$ Generalizing, we can consider two families of series: $$\mathcal A_m=\sum_{n=1}^\infty\,(-1)^n\,\Big(H_n-\,2H_{2n}+H_{4n}\Big)^m,\tag4$$ $$\mathcal B_m=\sum_{n=1}^\infty\Big(H_n-\,2H_{2n}+H_{4n}\Big)^m,\tag5$$ and try to evaluate them in a closed form.

So far I have the following conjectured result:

$$\large\sum_{n=1}^\infty\Big(H_n-\,2H_{2n}+H_{4n}\Big)^2\stackrel{\normalsize\color{gray}?}=\frac\pi8-\frac\pi{16}\,\ln2-\frac{\pi^2}{96}+\frac3{16}\,\ln^22-\frac{G}{4},\tag{\diamond}$$

where $G$ is the Catalan constant.

Could you please help me to prove this result and, possibly, find other values of $\mathcal A_m,\mathcal B_m$?

• Some possibly related questions are linked from here. Aug 22, 2015 at 18:18
• BTW, another similar series can be evaluated using generating functions: $\sum_{n=1}^\infty\frac1n\left(H_n-\,2H_{2n}+H_{4n}\right)=\frac34 \ln^2 2-\frac{\pi^2}{48}.$ Aug 22, 2015 at 19:07
• And another: $\sum_{n=1}^\infty\frac{(-1)^n}n\left(H_n-\,2H_{2n}+H_{4n}\right)=\frac12 \ln^2\!\left(1+\sqrt2\right)+\frac18 \ln^2 2-\frac{5\pi^2}{96}.$ Aug 22, 2015 at 19:43
• One way to tackle it, at least the case $m=2$, would be to write $H_n=\int_{0}^{1}{\frac{1-x^n}{1-x}dx}$ and to convert the series into a double integral which probably could be evaluated more easily. But I think this is what we call "Brute Force". Aug 22, 2015 at 19:56
• One more simple series where $O(n^{-1})$ term is cancelled using harmonic numbers only: $\sum_{n=1}^\infty\left(H_n-4H_{2n}+5H_{4n}-2H_{8n}\right)=\frac\pi{4\sqrt2} - \frac{3\pi}{16}.$ Aug 22, 2015 at 22:14

So basically, I'll evaluate a bunch of integrals, trying to avoid polylogs as much as possible.

First thing is to notice that $\displaystyle H_n-2H_{2n}+H_{4n}=\int_0^1 \frac{x^{2n}-x^{4n}}{1+x}dx$. I noticed that $H_n-2H_{2n}+H_{4n}=H_{4n}-H_{2n}-(H_{2n}-H_n)=H_{4n^{-}}-H_{{2n}^{-}}$, where $H_{n^{-}}=\sum_{k=1}^{n} \frac{(-1)^{k+1}}{k}$ is called a skew harmonic number (at least by Khristo N. Boyadzhiev. link.) Knowing they have a simple intergal representation I found the above. My answer is influenced by Boyadzhiev's work. If I make any unexplainable substitution, it's most likely $t=\frac{1-x}{1+x}$. Also, I'm not very good with Latex, so alignment should be awful. Hopefully there are no typos.

Below, easy enough to prove, is what I take for granted: $-\ln\sin x=\ln2+\sum_{n=1}^{\infty} \frac{\cos(2nx)}{n} ,-\ln\cos x=\ln2+\sum_{n=1}^{\infty} \frac{(-1)^n\cos(2nx)}{n} \tag{1}$

$$\int_0^{\frac{\pi}{2}} \cos x \cos(nx)dx=\begin{cases} \frac{\pi}{4} &n=1\\0 &n \,\,\text{odd}\\ \frac{(-1)^{1+n/2}}{n^2-1} &n \,\,\text{even} \end{cases} \tag{2}$$

$$\int_0^1 \frac{\ln(1-x)}{a+x}dx=-\operatorname{Li_2}\left(\frac1{a+1}\right)\tag{3}$$ Starting, $$\sum_{n=0}^{\infty}(H_{n}-2H_{2n}+H_{4n})^2=\sum_{n=0}^{\infty}\int_0^1\int_0^1\frac{(x^{2n}-x^{4n})(u^{2n}-u^{4n})}{(1+x)(1+u)}dxdu \\=\small\int_0^1\int_0^1\frac{dxdu}{(1+x)(1+u)(1-x^2u^2)}-2\int_0^1\int_0^1\frac{dxdu}{(1+x)(1+u)(1-x^2u^4)}+\int_0^1\int_0^1\frac{dxdu}{(1+x)(1+u)(1-x^4u^4)} \\=I_{22}-2I_{24}+I_{44}$$

Computing $I_{22}$.

Substitute $u=\frac{y}{x}$ ,change the order of integration, evaluate the inner integral, and substitue $t=\frac{1-x}{1+x}$ to get \begin{align} I_{22}=\int_0^1\int_0^1\frac{dxdu}{(1+x)(1+u)(1-x^2u^2)}=\int_0^1\int_0^x\frac{dydx}{(1+x)(x+y)(1-y^2)} \\=\int_0^1 \frac1{1-y^2}\int_1^y \frac{dx}{(1+x)(x+y)} dy=\int_0^1 \frac{\ln\left(\frac{(1+x)^2}{4x}\right)}{(1+x)(1-x^2)}\,dx \\=\frac{-1}{4}\int_0^1 \frac{(1+t)}{t^2}\ln(1-t^2)dt=-\frac14\int_0^1\frac{\ln(1-t^2)}{t^2}dt-\frac14\int_0^1\frac{\ln(1-t^2)}{t}dt \\=\frac14\sum_{n=0}^{\infty} \frac1{(n+1)(2n+1)}+\frac14\sum_{n=0}^{\infty} \frac1{(n+1)(2n+2)}=\frac{\ln2}{2}+\frac{\pi^2}{48}.\end{align}

Computing $I_{44}$.

Start the same as with $I_{22}$ to get $\displaystyle I_{44}=\int_0^1 \frac{\ln\left(\frac{(1+x)^2}{4x}\right)}{(1-x)(1-x^4)}\,dx=\frac{-1}{8}\int_0^1 \frac{\ln(1-t^2)}{t^2(1+t^2)}(1+t)^3dt$. We can calculate these integrals: \begin{align} \int_0^1 \frac{\ln(1-x^2)}{1+x^2}dx=\int_0^1 \frac{\ln(1+x)}{1+x^2}dx+\int_0^1 \frac{\ln(1-x)}{1+x^2}dx \tag{4} \\=\int_0^1 \frac{\ln(1+x)}{1+x^2}dx +\int_0^1 \frac{\ln\left(\frac{2t}{1+t}\right)}{1+t^2}dt \\=\frac{\pi}{4}\ln2+\sum_{n=0}^{\infty} (-1)^n\int_0^1\ln(t) t^{2n}dt=\frac{\pi}{4}\ln2-G. \end{align} \begin{align} \int_0^1 \frac{\ln(1-x^2)}{x^2(1+x^2)}dx=\int_0^1 \frac{\ln(1-x^2)}{x^2}dx-\int_0^1 \frac{\ln(1-x^2)}{1+x^2}dx \tag{5} \\=-\sum_{n=0}^{\infty} \frac1{n+1}\int_0^1 x^{2n}dx-\frac{\pi}{4}\ln2+G=G-\frac{\pi}{4}\ln2-2\ln2.\end{align} \begin{align} \int_0^1 \frac{x\ln(1-x^2)}{1+x^2}dx=\frac12\int_0^1 \frac{\ln(1-x)}{1+x}dx \tag{6} \\=-\frac12 \operatorname{Li_2}\left(\frac12\right)=\frac{\ln^2 2}{4}-\frac{\pi^2}{24}.\end{align} \begin{align} \int_0^1 \frac{\ln(1-x^2)}{x(1+x^2)}dx=\int_0^1 \frac{\ln(1-x^2)}{x}dx-\int_0^1 \frac{x\ln(1-x^2)}{1+x^2}dx \tag{7} \\=-\sum_{n=0}^{\infty}\frac1{n+1}\int_0^1 x^{2n+1}dx-\frac{\ln^2 2}{4}+\frac{\pi^2}{24}=-\frac{\pi^2}{24}-\frac{\ln^2 2}{4}.\end{align} Altogether, $$I_{44}=\frac{-1}{8}\int_0^1 \frac{\ln(1-x^2)}{x^2(1+x^2)}(1+3x+3x^2+x^3)dx \\=-\frac{\pi}{16}\ln2+\frac{\ln2}{4}+\frac{\ln^2 2}{16}+\frac{\pi^2}{48}+\frac{G}{4}.$$

Computing $I_{24}$.

Substitute $u=\frac{y}{x^2}$, change the order of integration, let $y\to y^2$, evaluate the inner integral,and substitue $t=\frac{1-x}{1+x}$: \begin{align*} I_{24}=\int_0^1\int_0^1\frac{dxdu}{(1+x)(1+u)(1-x^4u^2)}=\int_0^1\int_0^{x^2} \frac{dydx}{(1+x)(x^2+y)(1-y^2)} \\=\int_0^1 \frac1{1-y^2}\int_{\sqrt{y}}^1\frac{dx}{(1+x)(x^2+y)}dy=2\int_0^1\frac{y}{1-y^4}\int_{y}^1\frac{dx}{(1+x)(x^2+y^2)}dy \\=2\int_0^1\frac{\tan^{-1}\left(\frac{1-x}{1+x}\right)}{(1+x^2)(1-x^4)}dx-2\int_0^1\frac{x\ln\left(\frac{(1+x)\sqrt{1+x^2}}{2\sqrt{2}x}\right)}{(1+x^2)(1-x^4)}dx =I_{241}-I_{242}. \end{align*}

Evaulation of $I_{241}$.

Substitute $t=\frac{1-x}{1+x}$ to get $\displaystyle I_{241}=\frac14\int_0^1 \frac{\tan^{-1}(t)}{t(1+t^2)^2}(1+t)^4dt$.

We can calculate these integrals.In the following, let $x=\tan\theta$: \begin{align} \int_0^1 \frac{\tan^{-1}(x)}{(1+x^2)^2}dx=\int_0^{\frac{\pi}{4}}\theta\cos^2(\theta)d\theta=\frac{\pi^2}{64}+\frac{\pi}{16}-\frac18.\tag{8}\end{align} \begin{align} \int_0^1 \frac{x\tan^{-1}(x)}{(1+x^2)^2}dx=\int_0^{\frac{\pi}{4}}\theta\tan\theta\cos^2{\theta}d\theta=\frac12\int_0^{\frac{\pi}{4}}\theta\sin(2\theta)d\theta=\frac18.\tag{9}\end{align} \begin{align} \int_0^1 \frac{x^2\tan^{-1}(x)}{(1+x^2)^2}dx=\int_0^{\frac{\pi}{4}}\theta\sin^2(\theta)d\theta=\frac{\pi^2}{64}-\frac{\pi}{16}+\frac18.\tag{10}\end{align} \begin{align} \int_0^1 \frac{x^3\tan^{-1}(x)}{(1+x^2)^2}dx=\int_0^{\frac{\pi}{4}}\theta\sin^3(\theta)\sec{\theta}\,d\theta \tag{11} \\=\int_0^{\frac{\pi}{4}}\theta\tan\theta \,d\theta-\int_0^{\frac{\pi}{4}}\theta\sin\theta\cos\theta \,d\theta=\frac{\pi}{8}\ln2-\frac18+\int_0^{\frac{\pi}{4}}\ln\cos\theta \,d\theta \\=\frac{\pi}{8}\ln2-\frac18-\int_0^{\frac{\pi}{4}}\ln2 \,d\theta-\sum_{n=1}^{\infty} \frac{(-1)^n}{n}\int_0^{\frac{\pi}{4}}\cos(2n\theta)\,d\theta \\=-\frac{\pi}{8}\ln2-\frac18+\frac12\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n^2}\sin(\frac{\pi n}{2})=\frac{G}{2}-\frac{\pi}{8}\ln2-\frac18.\end{align} \begin{align} \int_0^1 \frac{\tan^{-1}(x)}{x(1+x^2)^2}dx=\int_0^{\frac{\pi}{4}}\theta\cos^3(\theta)\csc{\theta}\,d\theta \tag{12} \\=\int_0^{\frac{\pi}{4}}\theta\cot\theta \,d\theta-\int_0^{\frac{\pi}{4}}\theta\sin\theta\cos\theta \,d\theta=-\frac18-\frac{\pi}{8}\ln2-\int_0^{\frac{\pi}{4}}\ln\sin\theta \,d\theta \\=-\frac18-\frac{\pi}{8}\ln2+\int_0^{\frac{\pi}{4}}\ln2 \,d\theta+\sum_{n=1}^{\infty}\frac1{n}\int_0^{\frac{\pi}{4}}\cos(2n\theta)\,d\theta \\=-\frac18+\frac{\pi}{8}\ln2+\frac12\sum_{n=1}^{\infty} \frac{\sin(\frac{\pi n}{2})}{n^2}=\frac{G}{2}+\frac{\pi}{8}\ln2-\frac18.\end{align} Altogether, $$I_{241}=2\int_0^1\frac{\tan^{-1}\left(\frac{1-x}{1+x}\right)}{(1+x^2)(1-x^4)}dx= \frac14\int_0^1 \frac{\tan^{-1}(x)}{x(1+x^2)^2}(1+4x+6x^2+4x^3+x^4)dx \\=\frac{\pi^2}{32}+\frac18+\frac{G}{4}$$

Evaulation of $I_{242}$.

Substitute $t=\frac{1-x}{1+x}$ to get $$I_{242}=\frac14\int_0^1 \frac{\ln\left(\frac{\sqrt{1+t^2}}{1-t^2}\right)}{t(1+t^2)^2}(1-t^2)(1+t)^2dt \\=\frac12\int_0^1 \frac{\ln\left(\frac{\sqrt{1+t^2}}{1-t^2}\right)}{(1+t^2)^2}(1-t^2)dt+\frac14\int_0^1 \frac{\ln\left(\frac{\sqrt{1+t^2}}{1-t^2}\right)}{t(1+t^2)}(1-t^2)dt \\=\frac12\int_0^1 \frac{\ln\left(\frac{1+x^2}{1-x^2}\right)}{(1+x^2)^2}(1-x^2)dx-\frac14\int_0^1\frac{\ln(1+x^2)}{(1+x^2)^2}(1-x^2)dx\\+\frac18\int_0^1\frac{\ln(1+x^2)(1-x^2)}{x(1+x^2)}dx-\frac14\int_0^1\frac{\ln(1-x^2)(1-x^2)}{x(1+x^2)}dx$$ Calculating these integrals: \begin{align} \int_0^1 \frac{\ln\left(\frac{1+x^2}{1-x^2}\right)}{(1+x^2)^2}(1-x^2)dx=-\frac12\int_0^1 \frac{\ln\left(\frac{1-x}{1+x}\right)}{\sqrt{x}(1+x)}\frac{1-x}{1+x}dx \tag{13} \\=-\frac12\int_0^1\frac{t\ln t}{\sqrt{1-t^2}}dt=-\frac18\int_0^1\frac{\ln t}{\sqrt{1-t}}dt=-\frac18\int_0^1 t^{-1/2}\ln(1-t)dt \\=\frac14\sum_{n=0}^{\infty} \frac1{(n+1)(2n+3)}=\frac12-\frac{\ln2}{2}.\end{align} \begin{align} \int_0^1\frac{\ln(1+x^2)(1-x^2)}{x(1+x^2)}dx=\frac12\int_0^1\frac{\ln(1+x)(1-x)}{x(1+x)}dx \tag{14} \\=\frac12\int_0^1\frac{\ln(1+x)}{x}dx-\int_0^1\frac{\ln(1+x)}{1+x}dx \\=\frac12\sum_{n=0}^{\infty}\frac{(-1)^{n+1}}{n+1}\int_0^1 x^n dx-\frac12\ln^2(1+x)\bigg{|}_0^1=\frac{\pi^2}{24}-\frac{\ln^2 2}{2}.\end{align} \begin{align} \int_0^1\frac{\ln(1-x^2)(1-x^2)}{x(1+x^2)}dx=\frac12\int_0^1\frac{\ln(1-x)}{x}dx-\int_0^1\frac{\ln(1-x)}{1+x}dx \tag{15} \\=-\frac{\pi^2}{12}-\left(\frac{\ln^2 2}{2}-\frac{\pi^2}{12}\right)=-\frac{\ln^2 2}{2}.\end{align} $$\int_0^1\frac{\ln(1+x^2)}{(1+x^2)^2}(1-x^2)dx=-2\int_0^{\frac{\pi}{4}}\cos^2(\theta)(1-\tan^2\theta)\ln\cos\theta\,d\theta \tag{16} \\=-2\int_0^{\frac{\pi}{4}}\cos(2\theta)\ln\cos\theta\,d\theta=2\ln2\int_0^{\frac{\pi}{4}}\cos(2\theta)d\theta+\sum_{n=1}^{\infty} \frac{(-1)^n}{n}\int_0^{\frac{\pi}{2}}\cos\theta \cos(n\theta)d\theta \\=\ln2-\frac{\pi}{4}+\sum_{n=1}^{\infty} \frac{(-1)^{2n}}{2n}\frac{(-1)^{n+1}}{(2n)^2-1}=\frac{\ln2}{2}-\frac{\pi}{4}+\frac12.$$ Altogether, $\displaystyle I_{242}=\frac{\pi^2}{192}+\frac{\pi}{16}+\frac{\ln^2 2}{16}-\frac{3\ln2}{8}+\frac18$,

leading to $\displaystyle I_{24}=I_{241}-I_{242}=\frac{5\pi^2}{192}-\frac{\pi}{16}-\frac{\ln^2 2}{16}+\frac{3\ln2}{8}+\frac{G}{4}$, and finally, confirming the conjecture, $$\sum_{n=0}^{\infty}(H_{n}-2H_{2n}+H_{4n})^2=I_{22}-2I_{24}+I_{44}=\frac{\pi}{8}-\frac{\pi}{16}\ln2-\frac{\pi^2}{96}+\frac{3\ln^2 2}{16}-\frac{G}{4}.$$

I don't know about higher powers. I guess the case $\mathcal A_2$ can also be done. If we start the same as with $\mathcal B_2$, writing $\mathcal A_2=J_{22}-2J_{24}+J_{44}$ we can find that $\displaystyle J_{22}=\int_0^1\int_0^1\frac{dxdu}{(1+x)(1+u)(1+x^2u^2)}=2I_{44}-I_{22}=-\frac{\pi}{8}\ln2+\frac{G}{2}+\frac{\pi^2}{48}+\frac{\ln^2 2}{8}$

$J_{44}$ can be reduced to $\displaystyle =-\frac12\int_0^1 \frac{\ln(1-x^2)}{x(x^4+6x^2+1)}(1+x)^3 dx$. already this i can't evaulate fully, as polylogs are inescapable. Factorizing $x^2+6x+1=(x+3+2\sqrt{2})(x+3-2\sqrt{2}).$

I can get $\displaystyle \int_0^1 \frac{\ln(1-x^2)}{x(x^4+6x^2+1)}dx=-\frac{\pi^2}{12}+\frac{4-3\sqrt{2}}{16}\operatorname{Li_2}\left(\frac{2-\sqrt{2}}{4}\right)+\frac{4+3\sqrt{2}}{16}\operatorname{Li_2}\left(\frac{2+\sqrt{2}}{4}\right)$

but nothing more.

Edit 1.

After some more work and a fair amount of cancellation, we obtain $$\int_0^1 \frac{\ln(1-x^2)}{x(x^4+6x^2+1)}(1+x)^3 dx=\frac{1+2\sqrt{2}}{4}\pi\ln2-\frac{\pi^2}{24}-\frac14\ln\left(\frac{2+\sqrt{2}}{4}\right)\ln\left(\frac{2-\sqrt{2}}{4}\right) -\frac{\sqrt{2}+1}{2}\Im\operatorname{Li_2}\left(\frac{2+\sqrt{2}}{2}+\frac{i\sqrt{2}}{2}\right)-\frac{\sqrt{2}-1}{2}\Im\operatorname{Li_2}\left(\frac{2-\sqrt{2}}{2}+\frac{i\sqrt{2}}{2}\right)$$

I obtained it by calculating $\displaystyle \int_0^1 \frac{\ln(1+x)}{x+a}dx=\ln2\ln\left(\frac{a+1}{a-1}\right)+\operatorname{Li_2}\left(\frac2{1-a}\right)-\operatorname{Li_2}\left(\frac1{1-a}\right)$, which together with $(3)$ can be used to give a closed form for $\displaystyle \int_0^1\frac{\ln(1-x^2)}{x+a}dx$, which in turn, through partial fractions, can be used to give a closed form for $\displaystyle \int_0^1\frac{\ln(1-x^2)}{x^2+a^2}dx$. Fortunately, things didn't get too ugly as both $3+2\sqrt{2}$ and $3-2\sqrt{2}$ have nice square roots. I will fill in details as soon as I can.

Now we just need to evaluate $J_{24}$. Starting similarly as with $I_{24}$, we have: $$J_{24}=\int_0^1\int_0^1\frac{dxdu}{(1+x)(1+u)(1+x^4u^2)} \\=2\int_0^1\frac{\tan^{-1}\left(\frac{1-x}{1+x}\right)}{(1+x^2)(1+x^4)}dx-2\int_0^1\frac{x\ln\left(\frac{(1+x)\sqrt{1+x^2}}{2\sqrt{2}x}\right)}{(1+x^2)(1+x^4)}dx \\=J_{241}-J_{242}$$

Through $t=\frac{1-x}{1+x}$, $J_{241}$ turns to $\displaystyle \int_0^1 \frac{\tan^{-1}(x)}{(1+x^2)(x^4+6x^2+1)}(1+x)^4\,dx$. I don't have any idea about that yet. \Edit 1.

• Well done! Beautiful! $+1$ :D Apr 29, 2020 at 11:55

Just my thoughts for now: I would try to exploit Parseval's identity. For first, we have: $$H_n-2H_{2n}+H_{4n} =\int_{0}^{1}\frac{-x^n+2x^{2n}-x^{4n}}{1-x}\,dx \tag{1}$$ and: $$\sum_{n\geq 1}\frac{-x^n+2x^{2n}-x^{4n}}{1-x}e^{niy} = \frac{1}{1-x}\left(\frac{-1}{1-e^{iy}x}+\frac{2}{1-e^{iy}x^2}+\frac{-1}{1-e^{iy}x^4}\right).\tag{2}$$ The poles of the RHS (as a function of $x$) are located at $x\in\left\{e^{-iy},\pm e^{-iy/2},\pm e^{-iy/4},\pm i e^{-iy/4}\right\}$.

By using the residue theorem we may compute an explicit representation for: $$g(y) = \sum_{n\geq 1}\left(H_n-2H_{2n}+H_{4n}\right)e^{niy},\tag{3}$$ then Parseval's theorem gives: $$\sum_{n\geq 1}\left(H_n-2H_{2n}+H_{4n}\right)^2 = \frac{1}{2\pi}\int_{-\pi}^{\pi}g(y)g(-y)\,dy \tag{4}$$ and the resulting integral should be not to difficult to evaluate in terms of dilogarithms.

Another chance may be to apply summation by parts (like I did in this question), but it looks lengthy.

• It’s a very nice idea, but I think you are underestimating the difficulty of evaluating the integral. I checked the representation for $g$ using software: the result is a ton of terms of rational functions of trig’s and inverse trig’s and that is before computing $g(y)g(-y)$. This approach might work, but it looks like a lot of work. Sep 1, 2015 at 15:26
• @Winther: I know, it is a tough nut to crack with bare hands, but with some human-guided simplifications, it just boils down to computing some dilogarithmic integrals related with the fourth roots of unity. I haven't really delved into summation by parts, yet. It looks promising, maybe it is the simple way. Sep 1, 2015 at 15:35

I am going to use @nospoon's note in his solution above

$$H_n-2H_{2n}+H_{4n}=\overline{H}_{4n}-\overline{H}_{2n}$$

where $$\overline{H}_n=\sum_{k=1}^n \frac{(-1)^{k-1}}{k}=\int_0^1\frac{1-(-x)^{n}}{1+x}\ dx$$ is the alternating harmonic number

so

$$S=\sum_{n=1}^\infty(H_n-2H_{2n}+H_{4n})^2=\sum_{n=1}^\infty(\overline{H}_{4n}-\overline{H}_{2n})^2$$

now lets use $$\sum_{n=1}^\infty f(2n)=\sum_{n=1}^\infty f(n)+\sum_{n=1}^\infty (-1)^n f(n)$$

$$\Longrightarrow S=\frac12\sum_{n=1}^\infty(\overline{H}_{2n}-\overline{H}_{n})^2+\frac12\sum_{n=1}^\infty (-1)^n(\overline{H}_{2n}-\overline{H}_{n})^2$$

$$=\frac12S_1+\frac12S_2$$

From the integral representation of the alternating harmonic number, we have

$$(\overline{H}_{2n}-\overline{H}_{n})^2=\int_0^1\int_0^1\frac{((-x)^n-x^{2n})((-y)^n-y^{2n})}{(1+x)(1+y)}\ dxdy$$

$$\Longrightarrow S_1=\int_0^1\int_0^1\frac{dxdy}{(1+x)(1+y)}\left(\sum_{n=1}^\infty ((-x)^n-x^{2n})((-y)^n-y^{2n})\right)$$

$$=\int_0^1\int_0^1\frac{dxdy}{(1+x)(1+y)}\left(\frac32\frac{1}{1-xy}+\frac12\frac{1}{1+xy}-\frac{1}{1+x^2y}-\frac{1}{1+xy^2}\right)$$

$$=\frac32\int_0^1\int_0^1\frac{dxdy}{(1+x)(1+y)(1-xy)}+\frac12\int_0^1\int_0^1\frac{dxdy}{(1+x)(1+y)(1+xy)}$$ $$-2\int_0^1\int_0^1\frac{dxdy}{(1+x)(1+y)(1+x^2y)}$$

$$=\frac32(\ln2)+\frac12\left(\frac14\zeta(2)\right)-2\left(-\frac{\pi}{8}+\frac{3}{16}\zeta(2)+\frac34\ln2\right)$$

$$=\frac{\pi}{4}-\frac14\zeta(2)$$

Similarly

$$S_2=\int_0^1\int_0^1\frac{dxdy}{(1+x)(1+y)(1+xy)}-2\int_0^1\int_0^1\frac{dxdy}{(1+x)(1+y)(1-x^2y)}$$ $$+\int_0^1\int_0^1\frac{dxdy}{(1+x)(1+y)(1+x^2y^2)}$$

$$=\frac14\zeta(2)-2\left(\frac{G}{2}+\frac18\zeta(2)-\frac18\ln^22\right)+\left(\frac{G}{2}+\frac18\ln^22-\frac{\pi}{8}\ln2+\frac18\zeta(2)\right)$$

$$=\frac38\ln^22-\frac{\pi}{8}\ln2+\frac18\zeta(2)-\frac{G}{2}$$

Combine the results of $$S_1$$ and $$S_2$$ we get

$$S=\frac3{16}\ln^22-\frac{\pi}{16}\ln2+\frac{\pi}{8}-\frac1{16}\zeta(2)-\frac{G}{4}$$

Note: All these sub-integrals are trivial and can be found by integrating with respect to $$y$$ first then with respect to $$x$$ or the other way around.

• That's incredible. Yours and nospoon's answer are just beautiful. I am gobsmacked by this whole post. Apr 29, 2020 at 11:57
• @Mr Pie Thanks you and thanks to nospoon for the nice identity he provided. Jun 10, 2020 at 12:18