Additionally, we will employ the simplified notation for hypergeometric functions:

$$\begin{aligned} {}_{3}F_{2}\left[ \begin{array}{c} \frac{2a+1}{4}, \frac{2a+3}{4}, \frac{2b+1}{2} \\ c, \frac{2 d + 1}{2} \end{array} \ \Bigg | \ 1 \right] = \phantom {}_3 F_2\left( \tfrac{2a+1}{4},\tfrac{2a+3}{4},\tfrac{2b+1}{2}; c,\tfrac{2d+1}{2}; 1\right) . \end{aligned}$$

Unless differently stated, we will also assume that the variables involved in our series range over the interval (0, 1).

1 Hypergeometric series related to \(\pi ,\pi ^2\) and the lemniscate constant

In our previous works ([7, 8]) we stressed many consequences of the following principle:

Remark

Many hypergeometric functions have a Fourier–Legendre expansion whose coefficients still have a hypergeometric structure. In particular, given a hypergeometric series \(\phantom {}_p F_q(\ldots ;\pm 1)=\sum _{n\ge 0}a_n = \int _{0}^{1} f(x)\,g(x)\,dx\) and assuming that both f an g have manageable FL-expansions, the original series can be converted into an equivalent one. In many practical cases, the transformed series can be directly computed from Euler sums [3] with low (\(\le 5\)) weight.

Such approach turned out to be pretty effective in computing hypergeometric series involving \(\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2\) of \(\left[ \frac{1}{64^n}\left( {\begin{array}{c}4n\\ 2n\end{array}}\right) \left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] \). Starting with the identity

$$\begin{aligned} K(x){\mathop {=}\limits ^{L^2(0,1)}}\sum _{n\ge 0}\frac{2}{(2n+1)} P_n(2x-1) \end{aligned}$$

we proved that many series involving central binomial coefficients or their squares can be computed in explicit terms, most of the times depending on \(\pi , K, \log (2),\) \(\log (1+\sqrt{2})\) and \(\varGamma \left( \frac{1}{4}\right) \). By considering the moments

$$\begin{aligned} \int _{0}^{1} x^\eta K(x)\,dx, \qquad \int _{0}^{1} x^\eta E(x)\,dx \end{aligned}$$

and similar integrals associated to generalized elliptic integrals, we proved that the FL-machinery is able to produce representations for \(\pi \) in terms of ratios of \(\phantom {}_3 F_2\) functions. Such representations have been usually proved through the contiguity relations for hypergeometric functions [19]. The current section is about the application of the same idea to hypergeometric functions of the \(\frac{\left[ x(1-x)\right] ^n}{\sqrt{x(1-x)}}\) kind, with \(n\in {\mathbb {N}}\). In particular, the starting point of our current investigation is the identity

$$\begin{aligned} \frac{1}{\sqrt{x(1-x)}}{\mathop {=}\limits ^{L^2(0,1)}}\pi \sum _{n\ge 0}(4n+1)\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 P_{2n}(2x-1) \end{aligned}$$
(1)

which is a simple consequence of Rodrigues’ formula for Legendre polynomials. By Bonnet’s recursion formula, if the FL-expansion of f(x) is given by \(\sum _{n\ge 0} c_n P_n(2x-1)\), then the FL-expansion of \(g(x)=x\cdot f(x)\) is given by \(\sum _{n\ge 0}d_n P_n(2x-1)\), where for any \(n\ge 1\)

$$\begin{aligned} d_n = \frac{n}{2(2n-1)} c_{n-1} + \frac{1}{2}c_n + \frac{n+1}{2(2n+3)} c_{n+1}. \end{aligned}$$

Additionally, the symmetry of Legendre polynomials ensures that the FL-expansion of \(f(1-x)\) is simply given by \(\sum _{n\ge 0} c_n(-1)^n P_n(2x-1)\). In particular it is straightforward to exploit (1) to compute the FL-expansion of \(\sqrt{\frac{x}{1-x}}\) and of \(\sqrt{\frac{1-x}{x}}\), producing the following FL-expansion for \(\sqrt{x(1-x)}\):

$$\begin{aligned} \sqrt{x(1-x)}{\mathop {=}\limits ^{L^2(0,1)}} \frac{\pi }{8}\sum _{n\ge 0}\frac{4n+1}{(n+1)(1-2n)}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 P_{2n}(2x-1). \end{aligned}$$
(2)

Since \(\frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \sim \frac{1}{\sqrt{\pi n}}\) as \(n\rightarrow +\infty \), the series \(\sum _{n\ge 0}\frac{4n+1}{(n+1)(1-2n)}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2\) is absolutely convergent and the equality above holds as a pointwise equality for any \(x\in [0,1]\), too. Since \(P_{2n}(0)=(-1)^n\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] \), the evaluation of (2) at \(x=\frac{1}{2}\) leads to

$$\begin{aligned} \frac{1}{\pi } = \sum _{n\ge 0}\frac{(4n+1)(-1)^n}{4(n+1)(1-2n)}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^3 \end{aligned}$$
(3)

and the application of Parseval’s identity leads to

$$\begin{aligned} \frac{1}{\pi ^2} = \sum _{n\ge 0}\frac{3(4n+1)}{32(n+1)^2(1-2n)^2}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^4, \end{aligned}$$
(4)

while by computing the inner product between \(\sqrt{\frac{x}{1-x}}\) and \(\sqrt{\frac{1-x}{x}}\) we have

$$\begin{aligned} \frac{16}{\pi ^2} = \sum _{n\ge 0}\frac{8n^2+8n+1}{(n+1)^2}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^4, \end{aligned}$$
(5)

which are Ramanujan-like formulas for \(\frac{1}{\pi }\) and \(\frac{1}{\pi ^2}\). The RHS of (5) depends on \(\phantom {}_4 F_3\left( \tfrac{1}{2},\tfrac{1}{2},\tfrac{1}{2},\tfrac{1}{2};{\begin{matrix}1, &{} 1, &{} 1 \\ 1, &{} 1, &{} 2 \\ 1, &{} 2, &{} 2\end{matrix}}; 1\right) \). The formula above can be seen as a consequence of the contiguity relations for \(\phantom {}_4 F_3\) functions; nevertheless, it does not seem to be recognized by computer algebra systems. We may notice that for (moderately) large values of n the main term in the RHS of (3) behaves like \( \frac{C}{n^{5/2}}\) and the main term of the RHS of (4) behaves like \(\frac{C}{n^5}\). In terms of the contiguity relations for hypergeometric functions, (3) is equivalent to

$$\begin{aligned} \frac{16}{\pi } = 4\cdot \phantom {}_3 F_2\left( -\tfrac{1}{2},\tfrac{1}{2},\tfrac{1}{2};1,2;-1\right) +\phantom {}_3 F_2\left( \tfrac{1}{2},\tfrac{3}{2},\tfrac{3}{2};2,3;-1\right) \end{aligned}$$

and (4) is equivalent to

$$\begin{aligned} \frac{512}{3\pi ^2} = 16\cdot \phantom {}_4 F_3\left( -\tfrac{1}{2},-\tfrac{1}{2},\tfrac{1}{2},\tfrac{1}{2};1,2,2;1\right) +\phantom {}_4 F_3\left( \tfrac{1}{2},\tfrac{1}{2},\tfrac{3}{2},\tfrac{3}{2};2,3,3;1\right) . \end{aligned}$$

On the other hand, the procedure which allowed us to derive the FL-expansion of \(\sqrt{x(1-x)}\) from the FL-expansion of \(\frac{1}{\sqrt{x(1-x)}}\) can be applied again. It leads to the FL-expansions of \(\left[ x(1-x)\right] ^{3/2}\) and \(\left[ x(1-x)\right] ^{5/2}\):

$$\begin{aligned} \left[ x(1-x)\right] ^{3/2} = \frac{9\pi }{256}\sum _{n\ge 0}\frac{(4n+1)}{(n+1)_2 \left( \frac{1}{2}-n\right) _2}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 P_{2n}(2x-1),\\ \left[ x(1-x)\right] ^{5/2} = \frac{225\pi }{4096}\sum _{n\ge 0}\frac{(4n+1)}{(n+1)_3 \left( \frac{1}{2}-n\right) _3}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 P_{2n}(2x-1). \end{aligned}$$

Except for the extra term \(\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2\), these expansions are essentially identical to the FL-expansions for the generalized elliptic integrals we studied in our previous work. The evaluation at \(x=\frac{1}{2}\) produces

$$\begin{aligned}&\displaystyle \frac{1}{\pi } = \sum _{n\ge 0}\frac{9(4n+1)(-1)^n}{8(n+1)(n+2)(1-2n)(3-2n)}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^3, \end{aligned}$$
(6)
$$\begin{aligned}&\displaystyle \frac{1}{\pi } = \sum _{n\ge 0}\frac{225(4n+1)(-1)^n}{16(n+1)(n+2)(n+3)(1-2n)(3-2n)(5-2n)}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^3, \end{aligned}$$
(7)

where, for (moderately) large values of n, the main term of the RHS of (6) behaves like \(\frac{1}{n^{9/2}}\) and the main term of the RHS of (7) behaves like \(\frac{1}{n^{13/2}}\). (6) and (7) are equivalent to the contiguity relations

$$\begin{aligned} \frac{32}{3\pi }= & {} 2\cdot \phantom {}_3 F_2\left( -\tfrac{3}{2},\tfrac{1}{2},\tfrac{1}{2};1,3;-1\right) +\phantom {}_3 F_2\left( -\tfrac{1}{2},\tfrac{3}{2},\tfrac{3}{2};2,4;-1\right) ,\\ \frac{256}{5\pi }= & {} 8\cdot \phantom {}_3 F_2\left( -\tfrac{5}{2},\tfrac{1}{2},\tfrac{1}{2};1,4;-1\right) +5\cdot \phantom {}_3 F_2\left( -\tfrac{3}{2},\tfrac{3}{2},\tfrac{3}{2};2,5;-1\right) \end{aligned}$$

and Parseval’s identity ensures

$$\begin{aligned} \frac{1}{\pi ^2}= & {} \frac{2835}{16384}\sum _{n\ge 0}\frac{(4n+1)}{(n+1)_2^2\left( \frac{1}{2}-n\right) _2^2}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^4, \end{aligned}$$
(8)
$$\begin{aligned} \frac{1}{\pi ^2}= & {} \frac{35083125}{4194304}\sum _{n\ge 0}\frac{(4n+1)}{(n+1)_3^2 \left( \frac{1}{2}-n\right) _3^2}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^4, \end{aligned}$$
(9)

where, for (moderately) large values of n, the main term of the RHS of (8) behaves like \(\frac{1}{n^{9}}\) and the main term of the RHS of (9) behaves like \(\frac{1}{n^{13}}\). (8) and (9) are equivalent to the contiguity relations

$$\begin{aligned} \frac{16384}{315\pi ^2}= & {} 4\cdot \phantom {}_4 F_3\left( -\tfrac{3}{2},-\tfrac{3}{2},\tfrac{1}{2},\tfrac{1}{2};1,3,3;1\right) +\phantom {}_4 F_3\left( -\tfrac{1}{2},-\tfrac{1}{2},\tfrac{3}{2},\tfrac{3}{2};2,4,4;1\right) , \\ \frac{16777216}{17325\pi ^2}= & {} 64\cdot \phantom {}_4 F_3\left( -\tfrac{5}{2},-\tfrac{5}{2},\tfrac{1}{2},\tfrac{1}{2};1,4,4;1\right) +25\cdot \phantom {}_4 F_3\left( -\tfrac{3}{2},-\tfrac{3}{2},\tfrac{3}{2},\tfrac{3}{2};2,5,5;1\right) . \end{aligned}$$

Theorem 1

By induction on k we get that for any odd \(k\in {\mathbb {N}}\) the following identity holds pointwise over [0, 1]:

$$\begin{aligned} \left[ x(1-x)\right] ^{\frac{k}{2}} = \frac{\pi (k!!)^2}{8^k 2^{\frac{k+1}{2}}}\sum _{n\ge 0}\frac{(4n+1)\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2}{(n+1)_{\frac{k+1}{2}}\cdot \left( \frac{1}{2}-n\right) _{\frac{k+1}{2}}}\,P_{2n}(2x-1). \end{aligned}$$

Corollary 1

If \(p(x)\in {\mathbb {Z}}(x)\) is a polynomial with even degree, with simple roots belonging to the set \(\left\{ \ldots ,-3,-2,-1,\frac{1}{2},\frac{3}{2},\frac{5}{2},\ldots \right\} \), and such that \(p(x)=p\left( -\frac{1}{2}-x\right) \), then

$$\begin{aligned} \sum _{n\ge 0}(-1)^n\frac{4n+1}{p(n)}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^3 \end{aligned}$$

is a rational multiple of \(\frac{1}{\pi }\) and

$$\begin{aligned} \sum _{n\ge 0}\frac{4n+1}{p(n)^2}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^4,\qquad \sum _{n\ge 0}\frac{4n+1}{p(n)}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^4 \end{aligned}$$

are rational multiples of \(\frac{1}{\pi ^2}\).

Proof

If p(n) fulfills the mentioned constraints, \(\frac{1}{p(n)}\) can be written as a linear combination with rational coefficients of \( \frac{4n+1}{(n+1)(1-2n)}, \frac{4n+1}{(n+1)(n+2)(1-2n)(3-2n)}\) etcetera. The claim is therefore a straightforward consequence of Theorem 1. \(\square \)

By considering the inner product between different FL-expansions provided by Theorem 1 we also get that

Corollary 2

If \(p(x)\in {\mathbb {Z}}(x)\) is a monic polynomial with even degree, with simple or double roots belonging to the set \(\left\{ \ldots ,-3,-2,-1,\frac{1}{2},\frac{3}{2},\frac{5}{2},\ldots \right\} \), and such that \(p(x)=p\left( -\frac{1}{2}-x\right) \), then

$$\begin{aligned} \sum _{n\ge 0}\frac{4n+1}{p(n)}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^4 \end{aligned}$$

is a rational multiple of \(\frac{1}{\pi ^2}\).

The evaluation of the identity of Theorem 1 at \(x=\frac{1}{2}\) leads to

$$\begin{aligned} \sum _{n\ge 0}\frac{(-1)^n(4n+1)\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^3}{(n+1)_k\left( \frac{1}{2}-n\right) _k} =\frac{2}{\pi }\cdot \frac{16^k k!^2}{(2k)!^2} \end{aligned}$$
(10)

and if we apply Parseval’s identity to the statement of Theorem 1 we get

$$\begin{aligned} \sum _{n\ge 0}\frac{(4n+1)\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^4}{(n+1)_k^2 \left( \frac{1}{2}-n\right) _k^2} = \frac{2^{12k}(k!)^4}{\pi ^2 k(4k)!(2k)!^2}. \end{aligned}$$
(11)

Another function of the \(\left[ x(1-x)\right] ^\eta \) kind has a simple FL-expansion which is related to central binomial coefficients:

$$\begin{aligned} \left[ x(1-x)\right] ^{-1/4} = \frac{4\pi \sqrt{\pi }}{\varGamma \left( \frac{1}{4}\right) ^2}\sum _{n\ge 0}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] P_{2n}(2x-1). \end{aligned}$$
(12)

The evaluation at \(x=\frac{1}{2}\) and Parseval’s identity lead to

$$\begin{aligned}&\displaystyle \frac{2}{\pi }K(-1)=\sum _{n\ge 0}(-1)^n\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 = \frac{\varGamma \left( \frac{1}{4}\right) ^2}{(2\pi )^{3/2}}, \\&\displaystyle \frac{2}{\pi }\int _{0}^{1}K(x^4)\,dx=\sum _{n\ge 0}\frac{1}{4n+1}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 = \frac{\varGamma \left( \frac{1}{4}\right) ^4}{16\pi ^2}, \end{aligned}$$

while by combining (1) and (12) we get

$$\begin{aligned} \sum _{n\ge 0}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^3 = \frac{\varGamma \left( \frac{1}{4}\right) ^4}{4\pi ^3}. \end{aligned}$$

This provides a furher proof of \(K\left( \frac{1}{2}\right) =\frac{1}{4\sqrt{\pi }}\varGamma \left( \frac{1}{4}\right) ^2\), not directly relying on Clausen’s formula, giving the equality between \(\phantom {}_2 F_1\left( a,b;a+b+\frac{1}{2};z\right) ^2\) and \(\phantom {}_3 F_2\Big (2a,2b,a+b;a+b+\frac{1}{2},2a+2b;z\Big )\). Given the generating function for Legendre polynomials, the identity \(\frac{1}{\sqrt{1-x}}{\mathop {=}\limits ^{L^2(0,1)}}2\sum _{n\ge 0}P_n(2x-1)\) is straightforward. If we combine the FL-expansions of \(\frac{1}{\sqrt{1-x}}\) and \(\frac{1}{\root 4 \of {x(1-x)}}\) with Theorem 1 we obtain the following extension of Bauer’s and Levrie’s results ([2, 14]):

Theorem 2

For any \(k\in {\mathbb {N}}^+\) we have

$$\begin{aligned}&\sum _{n\ge 0}\frac{\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^3}{(n+1)_k\left( \frac{1}{2}-n\right) _k} = \frac{\varGamma \left( \frac{1}{4}\right) ^2}{2\pi \sqrt{2}}\cdot \frac{\varGamma \left( k+\tfrac{1}{4}\right) }{\varGamma \left( k+\tfrac{1}{2}\right) ^2\,\varGamma \left( k+\tfrac{3}{4}\right) },\\&\sum _{n\ge 0}\frac{\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2}{(n+1)_k\left( \frac{1}{2}-n\right) _k} = \frac{2^{8k-3}\varGamma (k)^2}{\pi \,\varGamma (4k)}. \end{aligned}$$

Additionally, if \(p(x)\in {\mathbb {Z}}[x]\) is a monic polynomial with even degree, with simple roots belonging to the set \(\left\{ \ldots ,-3,-2,-1,\frac{1}{2},\frac{3}{2},\frac{5}{2},\ldots \right\} \), and such that \(p(x)=p\left( -\frac{1}{2}-x\right) \), then

$$\begin{aligned} \sum _{n\ge 0}\frac{1}{p(n)}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^3 \end{aligned}$$

is a rational multiple of \(\frac{\varGamma \left( \frac{1}{4}\right) ^4}{8\pi ^3}\) and

$$\begin{aligned} \sum _{n\ge 0}\frac{1}{p(n)}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 \end{aligned}$$

is a rational multiple of \(\frac{1}{\pi }\).

We may also notice that by combining the FL-expansions of \(\frac{1}{\sqrt{x(1-x)}}\) and \(\frac{1}{\sqrt{2-x}}\) we have

which can be deduced from \(K(x)=\frac{\pi }{2\,\text {AGM}\left( 1,\sqrt{1-x}\right) }\) [4]. Such identity relates \(K(\sqrt{k_1}),\) \(K(\sqrt{k_4})\) and the lemniscate constant, where \(k_j=\lambda ^*(j)\) are the elliptic singular values, algebraic numbers fulfilling \(\frac{K(\sqrt{1-k_r})}{K(\sqrt{k_r})}=\sqrt{r}\).

If we combine Theorem 1 with the FL-expansion for the logarithm

$$\begin{aligned} \log (x){\mathop {=}\limits ^{L^2(0,1)}}-1+\sum _{n\ge 1}(-1)^{n+1}\left( \frac{1}{n}+\frac{1}{n+1}\right) P_n(2x-1) \end{aligned}$$

we get that for any odd \(k\in {\mathbb {N}}\)

$$\begin{aligned}&\frac{\varGamma \left( 1+\frac{k}{2}\right) ^2}{(k+1)!}\left[ H_{k/2}-H_{k+1}\right] = \int _{0}^{1}\log (x)\left[ x(1-x)\right] ^{k/2}\,dx\\&\quad = -\frac{\pi (k!!)}{8^k\left( \frac{k+1}{2}\right) !}-\frac{\pi (k!!)^2}{8^k\cdot 2^{\frac{k+1}{2}}}\sum _{n\ge 1}\frac{\left( \frac{1}{2n}+\frac{1}{2n+1}\right) \left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2}{(n+1)_{\frac{k+1}{2}}\left( \frac{1}{2}-n\right) _{\frac{k+1}{2}}} \end{aligned}$$

holds, and by letting \(k=(2j-1)\) we have

$$\begin{aligned} \frac{(2j)!}{4^j}\sum _{n\ge 1}\frac{\left( \frac{1}{2n}+\frac{1}{2n+1}\right) \left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2}{(n+1)_{j}\left( \frac{1}{2}-n\right) _{j}} = 2\log (2)-1-\sum _{m=1}^{2j}\frac{(-1)^{m+1}}{m}, \end{aligned}$$

which is an acceleration formula relating \(\phantom {}_4 F_3\left( 1,1,\tfrac{3}{2},\tfrac{3}{2}-j;2,2,2+j;1\right) \) and \(\phantom {}_3 F_2\left( \tfrac{3}{2},\tfrac{3}{2},\tfrac{3}{2}-j;\tfrac{5}{2},j+2;1\right) \). By Rodrigues’ formula the FL-expansion of \(\root 4 \of {x(1-x)}\) is given by

$$\begin{aligned} \root 4 \of {x(1-x)} = \frac{\varGamma \left( \frac{1}{4}\right) ^2}{4\sqrt{\pi }}\sum _{n\ge 0}\frac{4n+1}{(4n+3)(1-4n)}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] P_{2n}(2x-1) \end{aligned}$$

and by considering the inner product between the FL-expansions of \(\left[ x(1-x)\right] ^{\pm 1/4}\) we immediately get

$$\begin{aligned} \frac{1}{\pi }=\sum _{n\ge 0}\frac{1}{(4n+3)(1-4n)}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2, \end{aligned}$$

which is equivalent to \(\phantom {}_3 F_2\left( -\tfrac{1}{4},\tfrac{1}{2},\tfrac{1}{2};1,\tfrac{7}{4};1\right) =\frac{3}{\pi }\) or to computing \(\int _{0}^{1}x^{-1/4}(1-x)K(x)\,dx\). A similar problem concerns the explicit evaluation of

We may notice that \( K(x) = \sum _{n\ge 0}P_n(2x-1) \frac{2}{2n+1}\) and

$$\begin{aligned} -\frac{\log x}{\sqrt{x}} = \sum _{n\ge 0} P_n(2x-1) (-1)^{n} \left[ 8\sum _{k=0}^{n}\frac{1}{2k+1}-\frac{4}{2n+1}\right] , \end{aligned}$$

hence we may convert the original series into a combination of Euler sums:

$$\begin{aligned} \sum _{n\ge 0}\frac{1}{(2n+1)^2}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2= & {} \frac{1}{\pi }\sum _{n\ge 0}(-1)^n \frac{8\left( H_{2n+1}-\frac{1}{2}H_{2n}\right) -\frac{4}{2n+1}}{(2n+1)^2}\\= & {} \frac{\pi ^2}{8}+\frac{8}{\pi }\sum _{n\ge 1}\frac{H_{2n}(-1)^n}{(2n+1)^2}-\frac{4}{\pi }\sum _{n\ge 1}\frac{H_n(-1)^n}{(2n+1)^2}, \end{aligned}$$

then by invoking \(\sum _{n\ge 1}H_n x^n = \frac{-\log (1-z)}{1-z}\) and \(\int _{0}^{1}z^k \log (z)\,dz = -\frac{1}{(k+1)^2}\) we immediately have

$$\begin{aligned} \sum _{n\ge 1} \frac{(-1)^n H_{n}}{(2n+1)^2}= & {} \int _{0}^{1}\frac{\log (1+z^2)\log (z)}{1+z^2}\,dz\\= & {} 2\,{\text {Im}}\,{\text {Li}}_3\left( \tfrac{1+i}{2}\right) -K\log (2)-\frac{\pi ^3}{64}-\frac{\pi }{16}\log ^2(2), \\ \sum _{n\ge 1} \frac{(-1)^n H_{2n}}{(2n+1)^2}= & {} \int _{0}^{1}\frac{\log (z)}{2}\left( \frac{\log (1-iz)}{1-iz}+\frac{\log (1+iz)}{1+iz}\right) \,dz\\= & {} -{\text {Im}}\,{\text {Li}}_3\left( \tfrac{1+i}{2}\right) -\frac{1}{2}K\log (2)+\frac{3\pi ^3}{128}+\frac{\pi }{32}\log ^2(2), \end{aligned}$$

through the functional identities for \({\text {Li}}_2\) and \({\text {Li}}_3\). The terms related to \(K\log (2)\) and \(\pi \log ^2(2)\) simplify and this leads to the unexpected identity:

$$\begin{aligned} \sum _{n\ge 0}\frac{1}{(2n+1)^2}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2= & {} \phantom {}_4 F_3\left( \tfrac{1}{2},\tfrac{1}{2},\tfrac{1}{2},\tfrac{1}{2};1,\tfrac{3}{2},\tfrac{3}{2};1\right) \nonumber \\= & {} \frac{3\pi ^2}{8}+\frac{\log ^2(2)}{2}-\frac{16}{\pi }\,{\text {Im}}\,{\text {Li}}_3\left( \tfrac{1+i}{2}\right) . \end{aligned}$$
(13)

Since \(\sum _{n\ge 0}\frac{1}{(2n-1)^2}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 = \frac{4}{\pi }\) and \(\sum _{n\ge 0}\frac{1}{(2n-1)^3}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 = \frac{4K-6}{\pi }\), by reindexing we also get:

$$\begin{aligned} \sum _{n\ge 0}\frac{1}{(2n-1)^4}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2= & {} \phantom {}_4 F_3\left( -\tfrac{1}{2},-\tfrac{1}{2},-\tfrac{1}{2},-\tfrac{1}{2};1,\tfrac{1}{2},\tfrac{1}{2};1\right) \\= & {} \frac{3\pi ^2}{8}+\frac{\log ^2(2)}{2}-\frac{16}{\pi }\,{\text {Im}}\,{\text {Li}}_3\left( \tfrac{1+i}{2}\right) -\frac{8}{\pi }(K-1). \end{aligned}$$

The LHS of (13) is well-approximated by the more elementary

$$\begin{aligned} 1+\frac{1}{\pi }\sum _{n\ge 1}\frac{1}{(2n+1)^2\left( n+\frac{1}{4}\right) } = 3-\frac{\pi }{2}-\frac{4}{\pi }+\frac{4}{\pi }\log (2), \end{aligned}$$

and similar approximated identities can be produced by replacing \(\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2\) with \(\frac{1}{\pi \left( n+\frac{1}{4}\right) }\) in the series representing \(\left\| f(x) \right\| _{L^2(0,1)}^2\) for \(f(x)=\left[ x(1-x)\right] ^{k/2}\) and k being an odd natural number. As an alternative, using Theorem 2,

$$\begin{aligned} \frac{16}{3\pi }=\sum _{n\ge 0}\frac{\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2}{(n+1)\left( \frac{1}{2}-n\right) }\approx 2+\frac{1}{\pi }\sum _{n\ge 1}\frac{1}{(n+1)\left( \frac{1}{2}-n\right) \left( n+\frac{1}{4}\right) } \end{aligned}$$

implies \(\pi \approx 4-\frac{16}{13}\log (2)\), with the magnitude of the difference being \(<6\cdot 10^{-3}\). Many series involving squared central binomial coefficients, and eventually harmonic numbers, can be managed in a similar fashion. The following series appear in [5,6,7], too:

$$\begin{aligned} \sum _{n\ge 0}\frac{H_{n+1}}{n+1}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2= & {} -\frac{2}{\pi }\int _{0}^{1}K(x)\log (1-x)\,dx\\= & {} \frac{2}{\pi }\left[ 2+\sum _{n\ge 1}\frac{2}{(2n+1)^2}\left( \frac{1}{n}+\frac{1}{n+1}\right) \right] \\= & {} \frac{16}{\pi }(1-\log (2))\\\approx & {} \frac{17}{9}+\frac{\pi }{6}-\log 4+\frac{16}{3\pi }(K+\log (2))-\frac{2}{\pi }\left( 2+3\log ^2(2)\right) , \\ \sum _{n\ge 0}\frac{1}{(n+1)^2}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2= & {} -\frac{2}{\pi }\int _{0}^{1}K(x)\log (x)\,dx\\= & {} \frac{2}{\pi }\left[ 2+\sum _{n\ge 1}\frac{2(-1)^n}{(2n+1)^2}\left( \frac{1}{n}+\frac{1}{n+1}\right) \right] \\= & {} -4+\frac{16}{\pi }\\\approx & {} \frac{17}{9}-\frac{4}{\pi }-\frac{2 \pi }{9}+\frac{16 \log (2)}{3 \pi }. \end{aligned}$$

The approximation error in the former case is \(<5\cdot 10^{-3}\) and in the latter case it is \(<2\cdot 10^{-3}\).

Theorem 3

The computation of the FL-expansions of \(\frac{\log ^{k}(x)}{x}\) and \(\frac{\log ^{k}(x)}{\sqrt{x}}\) allows to convert any hypergeometric series of the \(\sum _{n\ge 0}\frac{1}{(2n+1)^m}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2\) or \(\sum _{n\ge 0}\frac{1}{(n+1)^m}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2\) kind into a combination of Euler sums, since the derivatives of the initial functions are immediately related to Stirling numbers of the first kind and central binomial coefficients.

For instance, the FL-expansion of \(\frac{\log ^2(x)}{\sqrt{x}}\) can be computed by noticing that

$$\begin{aligned} \frac{d^n}{dx^n}\left( \frac{\log ^2 x}{\sqrt{x}}\right) = \frac{(-1)^n}{x^n\sqrt{x}}\left[ A_n - B_n \log (x) + C_n \log ^2(x)\right] \end{aligned}$$

where trivially \(C_n = \frac{(2n-1)!!}{2^n}\) and \(B_n = \frac{2n-1}{2}B_{n-1}+2 C_{n-1}\). By letting \(B_n=\frac{(2n-1)!!}{2^n}{\widehat{B}}_n\) we get \({\widehat{B}}_n = {\widehat{B}}_{n-1}+\frac{4}{2n-1}\), hence \( B_n = \frac{(2n-1)!!}{2^n}\sum _{k=1}^{n}\frac{4}{2k-1}.\) Similarly \(A_n=\frac{2n-1}{2}A_{n-1}+B_{n-1}\) leads to

$$\begin{aligned} A_n= & {} \frac{(2n-1)!!}{2^n}\cdot 8\sum _{1\le k< m\le n}\frac{1}{(2k-1)(2m-1)}\\= & {} \frac{(2n-1)!!}{2^n}\cdot 4\left[ \left( \sum _{k=1}^{n}\frac{1}{2k-1}\right) ^2-\sum _{k=1}^{n}\frac{1}{(2k-1)^2}\right] \end{aligned}$$

hence by Rodrigues’ formula the FL expansion of \(\frac{\log ^2 x}{\sqrt{x}}\) is given by

$$\begin{aligned}&\sum _{n\ge 0} (2n+1)P_n(2x-1)\int _{0}^{1}\frac{(1-x)^n}{n!\sqrt{x}}\left[ A_n-B_n\log (x)+C_n\log ^2(x)\right] \,dx\\&=\sum _{n\ge 0}(-1)^n P_n(2x-1)\left[ 32\left( \sum _{k=0}^{n}\frac{1}{2k+1}\right) ^2-\frac{32}{2n+1}\sum _{k=0}^{n}\frac{1}{2k+1}+\frac{16}{(2n+1)^2}\right] . \end{aligned}$$

This approach leads to the equality between \(\sum _{n\ge 0}\frac{1}{(2n+1)^3}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 \) and

$$\begin{aligned}&\frac{1}{\pi }\int _{0}^{1}K(x^2)\log ^2(x)\,dx = \frac{1}{8\pi }\int _{0}^{1}K(x)\frac{\log ^2(x)}{\sqrt{x}}\,dx\\&\quad =\frac{8}{\pi }\sum _{n\ge 0}\frac{(-1)^n\left( \sum _{k=0}^{n}\frac{1}{2k+1}\right) ^2}{(2n+1)^2}-\frac{8}{\pi }\sum _{n\ge 0}\frac{(-1)^n\sum _{k=0}^{n}\frac{1}{2k+1}}{(2n+1)^3}+\frac{4}{\pi }\sum _{n\ge 0}\frac{(-1)^n}{(2n+1)^4}. \end{aligned}$$

The evaluation of the original series is now shown to be equivalent to the evaluation of standard and alternating Euler sums with weight 4. We trivially have \(\frac{4}{\pi }\sum _{n\ge 0}\frac{1}{(2n+1)^4}=\frac{\pi ^3}{24}\) and since \(\sum _{n\ge 1}H_n x^n=-\frac{\log (1-x)}{1-x}\) we also have

$$\begin{aligned}&\sum _{n\ge 0}\frac{\sum _{k=0}^{n}\frac{1}{2k+1}}{(2n+1)^3} = \sum _{n\ge 0}\frac{H_{2n+1}}{(2n+1)^3}-\frac{1}{2}\sum _{n\ge 0}\frac{H_n}{(2n+1)^3}\\&\quad = \sum _{n\ge 1}\frac{H_n}{n^3}-\sum _{n\ge 1}\frac{H_{2n}}{(2n)^3}-\frac{1}{2}\sum _{n\ge 0}\frac{H_n}{(2n+1)^3}\\&\quad = \frac{\pi ^4}{72}-\sum _{n\ge 1}\frac{H_{2n}}{(2n)^3}+\frac{1}{4}\int _{0}^{1}\frac{\log (1-x^2)\log ^2(x)}{1-x^2}\,dx\\&\quad = \frac{7\pi ^4}{1152}+\frac{7}{8}\log (2)\zeta (3)+\int _{0}^{1}\left[ \frac{\log (1-x)}{1-x}+\frac{\log (1+x)}{1+x}\right] \frac{\log ^2(x)}{4x}\,dx\\&\quad = -\frac{\pi ^4}{1152}+\frac{7}{8}\log (2)\zeta (3)+\int _{0}^{1}\frac{\log (1+x)\log ^2(x)}{4x(1+x)}\,dx\\&\quad = \frac{23\pi ^4}{5760}+\frac{7}{8}\log (2)\zeta (3)-\int _{0}^{1}\frac{\log (1+x)\log ^2(x)}{4(1+x)}\,dx\\&\quad = \frac{83\pi ^4}{5760}+\frac{\pi ^2}{24}\log ^2(2)-\frac{\log ^4(2)}{24}-{\text {Li}}_4\left( \tfrac{1}{2}\right) , \end{aligned}$$

in agreement with De Doelder [10] and Sitaramachandra Rao [18]. Recalling that \({\mathscr {H}}_{n}(s)=\sum _{k=0}^{n}\frac{1}{(2k+1)^s}\), in order to evaluate the series \(\sum _{n\ge 0}\frac{{\mathscr {H}}_n^2}{(2n+1)^2}\) it is enough to exhibit a slight generalization of Theorem 4.1 of Flajolet and Salvy [11]. Though the residues of \(\left[ \psi (-s)+\gamma \right] ^3\) they prove the following reduction formula for quadratic Euler sums:

$$\begin{aligned} \sum _{n\ge 1}\frac{H_n^2}{n^q} = \sum _{n\ge 1}\frac{H_n(2)}{n^q} + q\sum _{n\ge 1}\frac{H_n}{n^{q+1}}- \frac{q(q+1)}{6}\zeta (q+2) + \zeta (2)\zeta (q) \end{aligned}$$

which restricted to the case \(q=2\), by symmetry, simply leads to

$$\begin{aligned} \sum _{n\ge 1}\frac{H_n^2}{n^2} = 2\sum _{n\ge 1}\frac{H_n}{n^3} +\frac{13\pi ^4}{360}. \end{aligned}$$

In our case we may notice that, in the same spirit, \(\sum _{n\ge 0}\frac{{\mathscr {H}}_n^2}{(2n+1)^2}\) equals

$$\begin{aligned}&\sum _{0\le j,k \le n}\frac{1}{(2n+1)^2(2k+1)(2j+1)}\\&\quad = \sum _{0\le j\le n}\frac{1}{(2n+1)^2(2j+1)^2}+2\sum _{0\le j< k\le n}\frac{1}{(2n+1)^2 (2k+1)(2j+1)} \\&\quad = \frac{1}{2}\left[ {\mathscr {H}}_{\infty }(2)\cdot {\mathscr {H}}_{\infty }(2)+{\mathscr {H}}_{\infty }(4)\right] +\sum _{0\le j<k\le n}\frac{\frac{1}{2j+1}-\frac{1}{2k+1}}{(2n+1)^2(k-j)}\\&\quad = \frac{5\pi ^4}{384}+\sum _{n\ge 0}\frac{1}{(2n+1)^2}\sum _{j=0}^{n}\frac{H_{n-j}-H_j}{2j+1}:=\frac{5\pi ^4}{384}+{\mathscr {Z}}(1,1,2). \end{aligned}$$

For any \(n\in {\mathbb {N}}\) we have

$$\begin{aligned} {\mathscr {H}}_n^2 = -\mathop {\hbox {Res}}\limits _{z=-(2n+1)}\frac{1}{4}\left( \gamma +2\log (2)+\psi \left( \frac{z}{2}\right) \right) ^2\left( \gamma +\psi (s)\right) \end{aligned}$$

since for any \(n\in {\mathbb {N}}\) the Laurent series of \(\gamma +\psi (z)\) centered at \(z=-n\) is given by \(-\frac{1}{z+n}+H_n+\left( H_{n}(2)+\zeta (2)\right) (z+n)+O((z+n)^2)\) and, similarly, for any even \(n\in {\mathbb {N}}\) the Laurent series of \(\frac{1}{2}\left( \gamma +2\log (2)+\psi \left( \frac{z}{2}\right) \right) \) centered at \(z=-n\) is given by

$$\begin{aligned} -\frac{1}{z+n}+\frac{1}{2}\left( H_{n/2}+2\log (2)\right) +\frac{1}{4}\left( H_{n/2}(2)+\zeta (2)\right) (z+n)+O((z+n)^2). \end{aligned}$$

Therefore the computation of \(\sum _{n\ge 0}\frac{{\mathscr {H}}_n^2}{(2n+1)^2}\) can be performed by considering the residues of \(\frac{1}{4z^2}\left( \gamma +2\log (2)+\psi \left( \frac{z}{2}\right) \right) ^2\left( \gamma +\psi (z)\right) \), which boils down to computing the residue at the origin (\(\frac{\pi ^2}{4}-\log ^2(2)\)) and the Euler sums \(\sum _{n\ge 1}\frac{H_n^2}{n^2}=\frac{17\pi ^4}{360},\sum _{n\ge 1}\frac{H_{n}(2)}{n^2}=\frac{7\pi ^4}{360}\), together with the less elementary \(\sum _{n\ge 1}\frac{H_n H_{2n}}{n^2}\).

On the other hand, we may also consider that, by continuing \({\mathscr {H}}_n\) to negative integers through \({\mathscr {H}}_{-1}=0\) and \({\mathscr {H}}_{-(n+2)}={\mathscr {H}}_n\),

$$\begin{aligned} \sum _{n\in {\mathbb {Z}}}\frac{{\mathscr {H}}_n^2}{(2n+1)^2}= & {} 2\sum _{n\ge 0}\frac{{\mathscr {H}}_n^2}{(2n+1)^2}-2\sum _{n\ge 0}\frac{{\mathscr {H}}_n}{(2n+1)^3}+\sum _{n\ge 0}\frac{1}{(2n+1)^4}\\= & {} \frac{1}{4}\sum _{n\in {\mathbb {Z}}}\frac{\left( \psi \left( n+\frac{3}{2}\right) -\psi \left( \frac{1}{2}\right) \right) ^2}{(2n+1)^2}\\= & {} -\frac{1}{4}\sum _{m\ge 0}\mathop {\hbox {Res}}\limits _{z=-(2m+1)/2} \pi \cot (\pi z)\left( \frac{\psi \left( z+\frac{3}{2}\right) -\psi \left( \frac{1}{2}\right) }{2z+1}\right) ^2\\= & {} \frac{\pi ^2}{4}\log ^2(2)+\frac{\pi ^4}{96}. \end{aligned}$$

This identity has many direct consequences:

$$\begin{aligned} {\mathscr {Z}}(1,1,2)= & {} \frac{\pi ^4}{720}+\frac{\pi ^2}{6}\log ^2(2)-\frac{\log ^4(2)}{24}-{\text {Li}}_4\left( \tfrac{1}{2}\right) ,\\ \mu _1= & {} \frac{1}{2}\int _{0}^{1}\frac{\log ^2(z)\log (1+z)}{z(1+z)}\,dz= \sum _{n\ge 1}\frac{(-1)^{n+1} H_n}{n^3}\\= & {} \frac{11\pi ^4}{360}+\frac{\pi ^2}{12}\log ^2(2)-\frac{\log ^4(2)}{12}-\frac{7}{4}\log (2)\zeta (3)-2\,{\text {Li}}_4\left( \tfrac{1}{2}\right) ,\\ \sum _{n\ge 0}\frac{H_{n+1}^2+H_{n+1}(2)}{n+1}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2= & {} \frac{2}{\pi }\int _{0}^{1}K(x^2)\log ^2(1-x)\,dx\\ {}= & {} \frac{96}{\pi }-\frac{8\pi }{3}-\frac{128}{\pi }\log (2)+\frac{64}{\pi }\log ^2(2), \end{aligned}$$

and it also allows the explicit evaluation of

$$\begin{aligned} \sum _{n\ge 1}\frac{H_n H_{2n}}{n^2}= & {} 2\sum _{a,b,n\ge 1}\frac{1}{ab(a+n)(b+2n)}\\= & {} 2\iint _{(0,1)^2}\frac{w\log (1-w)\log (1-z)}{1-w^2 z}\,dw\,dz \end{aligned}$$

in terms of \(\pi ,\log (2),\zeta (3)\) and \({\text {Li}}_4\left( \tfrac{1}{2}\right) \), although such formula is pretty much involved and not really relevant in the forthcoming manipulations.

We are now ready to tackle the alternating Euler sums with weight 4 involving the powers of \({\mathscr {H}}_n\). By mimicking the approach used to evaluate \(\sum _{n\ge 0}\frac{{\mathscr {H}}_n^2}{(2n+1)^2}\) we have that

$$\begin{aligned}&\sum _{n\in {\mathbb {Z}}}\frac{(-1)^n {\mathscr {H}}_n^2}{(2n+1)^2} = 2 \sum _{n\ge 0}\frac{(-1)^n {\mathscr {H}}_n}{(2n+1)^3}-\sum _{n\ge 0}\frac{(-1)^n}{(2n+1)^4}\\&\quad = -\frac{1}{4}\sum _{m\ge 0}\mathop {\hbox {Res}}\limits _{z=-(2m+1)/2}\frac{\pi }{\sin (\pi z)}\left( \frac{\psi \left( z+\frac{3}{2}\right) -\psi \left( \frac{1}{2}\right) }{2z+1}\right) ^2\\&\quad = \frac{\pi ^3}{24}\log (2)-\frac{1}{4}\sum _{m\ge 1}\left[ -\frac{\pi (-1)^m}{2m^3}+\frac{\pi (-1)^m}{2m^2}\left( H_{m-1}(2)+2\log (2)\right) \right] \\&\quad = \frac{\pi ^3}{16}\log (2)-\frac{3\pi }{32}\zeta (3)-\frac{\pi }{8}\int _{0}^{1}\frac{{\text {Li}}_2(-x)\log (x)}{1+x}\,dx \end{aligned}$$

where the last integral depends on \(\mu _1\): it equals \(\frac{13\pi ^4}{288}-\frac{\log ^4(2)}{6}+\frac{\pi ^2}{6}\log ^2(2)-4\,{\text {Li}}_4\left( \tfrac{1}{2}\right) -\frac{7}{2}\log (2)\zeta (3)\). Similarly

$$\begin{aligned}&\sum _{n\in {\mathbb {Z}}}\frac{(-1)^n {\mathscr {H}}_n^3}{2n+1}\\&\quad =2 \sum _{n\ge 0}\frac{(-1)^n {\mathscr {H}}_n^3}{2n+1}-3 \sum _{n\ge 0}\frac{(-1)^n {\mathscr {H}}_n^2}{(2n+1)^2}+3\sum _{n\ge 0}\frac{(-1)^n{\mathscr {H}}_n}{(2n+1)^3}-\sum _{n\ge 0}\frac{(-1)^n}{(2n+1)^4}\\&\quad = -\sum _{m\ge 0}\mathop {\hbox {Res}}\limits _{z=-(2m+1)/2}\frac{\pi }{\sin (\pi z)(2z+1)}\left( \frac{\psi \left( z+\frac{3}{2}\right) -\psi \left( \frac{1}{2}\right) }{2}\right) ^3\\&\quad = \frac{\pi }{2}\log ^3(2)-\frac{\pi }{8}\sum _{m\ge 1}(-1)^m\left[ -\frac{6}{m}\left( \frac{H_{m-1}}{2}+\log (2)\right) ^2+\frac{3}{m}\left( \frac{H_{m-1}(2)}{2}+\frac{\pi ^2}{12}\right) \right] \\&\quad -\frac{\pi }{8}\sum _{m\ge 1}(-1)^m\left[ \frac{3}{m^2}\left( \frac{H_{m-1}}{2}+\log (2)\right) -\frac{1}{2m^3}-\frac{\pi ^2}{4m}\right] \\&\quad = \frac{\pi }{8}\log ^3(2)+\frac{\pi ^3}{32}\log (2)-\frac{15\pi }{128}\zeta (3)+\frac{3\pi }{16}\sum _{m\ge 1}\frac{(-1)^m}{m}\left( H_m^2-H_{m}(2)\right) \\&\quad = \frac{\pi }{8}\log ^3(2)+\frac{\pi ^3}{32}\log (2)-\frac{15\pi }{128}\zeta (3)+\frac{3\pi }{16}\int _{0}^{1}\frac{\log ^2(1+x)}{x(1+x)}\,dx\\&\quad = \frac{\pi }{16}\log ^3(2) +\frac{\pi ^3}{32}\log (2)-\frac{9\pi }{128}\zeta (3), \end{aligned}$$

such that

$$\begin{aligned}&\sum _{n\ge 0}\frac{1}{(2n+1)^3}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 =\phantom {}_5 F_4\left( \tfrac{1}{2},\tfrac{1}{2},\tfrac{1}{2},\tfrac{1}{2},\tfrac{1}{2};1,\tfrac{3}{2},\tfrac{3}{2},\tfrac{3}{2};1\right) \\&\quad = \frac{16}{3\pi }\sum _{n\ge 0}\frac{(-1)^n {\mathscr {H}}_n^3}{2n+1}-\frac{\log ^3(2)}{6}-\frac{\pi ^2}{12}\log (2)+\frac{3}{16}\zeta (3)+\frac{4}{3\pi }\beta (4).\end{aligned}$$

The previous equation gives an explicit relation between a cubic, alternating Euler sum with weight four and a quadratic, alternating sum with the same weight. These series are further generalizations of the quadratic, alternating Euler sums with weight four computed by Xu, Yang and Zhang in [20]. The combination \(2\sum _{n\in {\mathbb {Z}}}\frac{(-1)^n {\mathscr {H}}_n^3}{2n+1}-3\sum _{n\in {\mathbb {Z}}}\frac{(-1)^n {\mathscr {H}}_n^2}{(2n+1)^2}\) has been computed by Zheng in [23] ((4.5a), (4.5b)), by exploiting the Dougall-Dixon theorem and by comparing the coefficients of suitable infinite products. In the FL-setting we may notice that

$$\begin{aligned} 2\,K(x)-\frac{\log (1-x)}{\sqrt{1-x}} {\mathop {=}\limits ^{L^2(0,1)}} 8\sum _{n\ge 0}{\mathscr {H}}_n P_n(2x-1) \end{aligned}$$
(14)

immediately leads to

$$\begin{aligned} 64 \sum _{n\ge 0}\frac{(-1)^n {\mathscr {H}}_n^2}{2n+1}= & {} \frac{\pi ^3}{3}+4\pi \log ^2(2)-4\int _{0}^{1}K(x)\frac{\log x}{\sqrt{x}}\,dx\\= & {} \frac{\pi ^3}{3}+4\pi \log ^2(2)+8\pi \sum _{n\ge 0}\frac{1}{(2n+1)^2}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 \\= & {} \frac{10\pi ^3}{3}+8\pi \log ^2(2)-128\,{\text {Im}}\,{\text {Li}}_3\left( \tfrac{1+i}{2}\right) . \end{aligned}$$

By exploiting the expansion of \(\frac{\log (x)}{\sqrt{1-x}}\) it is possible to compute \(\sum _{n\ge 0}\frac{(-1)^n {\mathscr {H}}_n^2}{(2n+1)^3}\) in a similar way. Proving the following identities is a simpler task:

$$\begin{aligned}&\sum _{n\ge 0}\frac{1}{(n+1)^3}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 = \phantom {}_4 F_3\left( \tfrac{1}{2},\tfrac{1}{2},1,1;2,2,2;1\right) \\&\qquad \qquad \qquad \qquad \qquad \qquad \qquad =\frac{16}{\pi }\left[ 3-2K-\pi +\pi \log (2)\right] ,\\&\quad \sum _{n\ge 0}\frac{1}{(n+1)^4}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2=\phantom {}_5 F_4\left( \tfrac{1}{2},\tfrac{1}{2},1,1,1;2,2,2,2;1\right) \\&\quad =\frac{2}{\pi }\left[ 64-64K-24\pi +3\pi ^3-128\,{\text {Im}}\,{\text {Li}}_3\left( \tfrac{1+i}{2}\right) +32\,\pi \log (2)-12\,\pi \log ^2(2)\right] . \end{aligned}$$

They can be deduced in a straightforward way from the FL-expansions of \(\frac{d}{dx}E(x)\) (computed in our previous work [8]), \(\log (x)\) and \(\log ^2(x)\). They also lead to

$$\begin{aligned}&\displaystyle \sum _{n\ge 0}\frac{1}{(2n-1)^2}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 = \phantom {}_2 F_1\left( -\tfrac{1}{2},-\tfrac{1}{2};1;1\right) =\frac{4}{\pi }, \\&\displaystyle \sum _{n\ge 0}\frac{1}{(2n-1)^2 (2n-3)^2}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 = \tfrac{1}{9}\cdot \phantom {}_2 F_1\left( -\tfrac{3}{2},-\tfrac{3}{2};1;1\right) =\frac{32}{27\pi }, \end{aligned}$$

which are consistent with the representations of \(\frac{1}{\pi }\) obtained in [8] by computing the moments of generalized elliptic integrals. Similar manipulations might be useful in improving the state of the art about the irrationality measure of \(\pi \), since it is much simpler to estimate the irrationality measure of \(\log (2)\) through Beukers-like integrals and Viola’s method, as done by Viola himself and Marcovecchio in [15]. Hypergeometric functions extending the “usual” kernels \(x^a(1-x)^b\) and \(P_n(x)\) have been crucial in the work of Zudilin [22] about the irrationality measure of \(\pi ^2\), too. An application of the Cauchy-Schwarz inequality leads to

where the series involving \(\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^4\) has been computed by considering the FL-expansions of \(\sqrt{x(1-x)}\) and \(\frac{1}{\sqrt{x(1-x)}}\). This already leads to \(\pi \approx 3.141609\) and it can be generalized by replacing the \((n+1)\left( \frac{1}{2}-n\right) \) term with \((n+1)_k\left( \frac{1}{2}-n\right) _k\) for \(k>1\). Approximations of zero through linear combinations with rational coefficients of \(1,\pi ,\pi ^3,\log (2)\) and \(\zeta (3)\) can be produced by considering the more accurate estimation \(\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 \approx \frac{1}{\pi \left( n+\frac{1}{4}\right) }-\frac{1}{32\pi \left( n+\frac{1}{4}\right) ^3}\) as \(n\gg 1\).

We may also consider that by creative telescoping, the following identity holds for any \(n\in {\mathbb {N}}\):

$$\begin{aligned}&\sum _{m\ge 1}\frac{\varGamma \left( m-\frac{1}{4}\right) ^2}{\varGamma \left( -\frac{1}{4}\right) ^2 (n+1)_m \left( \frac{1}{2}-n\right) _m}\nonumber \\&\quad = -\frac{1}{(4n+1)^2}+(-1)^n \frac{4^n\sqrt{\pi }}{(4n+1)^2\,\varGamma \left( \frac{3}{4}\right) ^2\left( {\begin{array}{c}2n\\ n\end{array}}\right) }. \end{aligned}$$
(15)

If we multiply both sides by \((-1)^n (4n+1)\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^3\) and sum over \(n\ge 0\) we get

$$\begin{aligned}&\sum _{m\ge 1}\frac{\varGamma \left( m-\frac{1}{4}\right) ^2}{\varGamma \left( -\frac{1}{4}\right) ^2}\sum _{n\ge 0}\frac{(-1)^n (4n+1)\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^3}{(n+1)_m\left( \frac{1}{2}-n\right) _m}\nonumber \\&\quad = \frac{\varGamma \left( \frac{1}{4}\right) ^6}{32\pi ^{7/2}}-\phantom {}_4 F_3\left( \tfrac{1}{4},\tfrac{1}{2},\tfrac{1}{2},\tfrac{1}{2};1,1,\tfrac{5}{4};-1\right) \end{aligned}$$
(16)

and by exploiting the consequence of Parseval’s identity provided by (10) we get

$$\begin{aligned} \frac{2}{\pi }\sum _{m\ge 1}\frac{\varGamma \left( m-\frac{1}{4}\right) ^2 16^m m!^2}{\varGamma \left( -\frac{1}{4}\right) ^2 (2m)!^2}= & {} \frac{1}{2\pi }\phantom {}_3 F_2\left( \tfrac{3}{4},\tfrac{3}{4},1;\tfrac{3}{2},\tfrac{3}{2};1\right) \nonumber \\= & {} \frac{\varGamma \left( \frac{1}{4}\right) ^6}{32\pi ^{7/2}}-\phantom {}_4 F_3\left( \tfrac{1}{4},\tfrac{1}{2},\tfrac{1}{2},\tfrac{1}{2};1,1,\tfrac{5}{4};-1\right) \end{aligned}$$
(17)

reducing the problem of evaluating a \(\phantom {}_4 F_3\left( \ldots ,-1\right) \) with quarter-integer parameters to the problem of evaluating a \(\phantom {}_3 F_2(\ldots ,1)\) with quarter-integer parameters. On its turn the last problem is equivalent to finding the \(L^2\) norm over \(S^1\) for \(\phantom {}_2 F_1\left( \tfrac{3}{4},1;\tfrac{3}{2};z\right) =\int _{0}^{1}\frac{dt}{(1-z+z t^2)^{3/4}}\). In the opposite direction the identity above can be seen as an acceleration formula, since the main term of the series defining \(\phantom {}_4 F_3(\ldots ,-1)\) has an alternating sign and a faster decay to zero with respect to the main term of the series defining \(\phantom {}_3 F_2(\ldots ,1)\).

If we multiply both sides of (15) by \(\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2\) and sum over \(n\ge 0\), by Theorem 2 we get

$$\begin{aligned}&\sum _{m\ge 1}\frac{\varGamma \left( m-\frac{1}{4}\right) ^2}{\varGamma \left( -\frac{1}{4}\right) ^2}\sum _{n\ge 0}\frac{\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2}{(n+1)_m\left( \frac{1}{2}-n\right) _m}= \frac{1}{3\pi }\phantom {}_4 F_3\left( \tfrac{3}{4},\tfrac{3}{4},1,1;\tfrac{5}{4},\tfrac{3}{2},\tfrac{7}{4};1\right) \\&\quad =\frac{1}{8\pi }\int _{0}^{1}K(x)x^{-3/4}\log (x)\,dx- \frac{\sqrt{\pi }}{4\,\varGamma \left( \frac{3}{4}\right) ^2}\int _{0}^{1}\frac{\log (x)\,dx}{\sqrt{x(1+x^2)}}\\&\quad = \frac{\sqrt{\pi }}{\varGamma \left( \frac{3}{4}\right) ^2}\phantom {}_3 F_2\left( \tfrac{1}{4},\tfrac{1}{4},\tfrac{1}{2};\tfrac{5}{4},\tfrac{5}{4};-1\right) -\phantom {}_4 F_3\left( \tfrac{1}{4},\tfrac{1}{4},\tfrac{1}{2},\tfrac{1}{2};1,\tfrac{5}{4},\tfrac{5}{4};1\right) . \end{aligned}$$

Similarly, if we multiply both sides of (15) by \(\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^3\) and sum over \(n\ge 0\), by Theorem 2 we get

$$\begin{aligned} \sum _{m\ge 1}&\frac{\varGamma \left( m-\frac{1}{4}\right) ^2}{\varGamma \left( -\frac{1}{4}\right) ^2}\sum _{n\ge 0}\frac{\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^3}{(n+1)_m\left( \frac{1}{2}-n\right) _m}= \frac{\varGamma \left( \frac{1}{4}\right) ^4}{48\pi ^3}\phantom {}_4 F_3\left( \tfrac{3}{4},\tfrac{3}{4},1,\tfrac{5}{4};\tfrac{3}{2},\tfrac{3}{2},\tfrac{7}{4};1\right) \\= & {} \frac{1}{\varGamma \left( \frac{3}{4}\right) ^2}\,\phantom {}_4 F_3\left( \tfrac{1}{4},\tfrac{1}{4},\tfrac{1}{2},\tfrac{1}{2};1,\tfrac{5}{4},\tfrac{5}{4};-1\right) -\phantom {}_5 F_4\left( \tfrac{1}{4},\tfrac{1}{4},\tfrac{1}{2},\tfrac{1}{2},\tfrac{1}{2};1,1,\tfrac{5}{4},\tfrac{5}{4};1\right) . \end{aligned}$$

2 Twisted hypergeometric series

When manipulating hypergeometric series through the binomial or Euler’s transforms, generalized harmonic numbers \(H_{n}(s)\) may appear among the factors of the new main term. For instance, some solutions to the Basel problem \(\zeta (2)=\frac{\pi ^2}{6}\) exploit the identity \(\zeta (2) = 2\sum _{n\ge 1}\frac{H_n}{n 2^n}\). In this context it is pretty natural to wonder if a technique for the explicit evaluation of some \(\phantom {}_p F_q(\ldots ;\pm 1)\) allows the evaluation of twisted series too, i.e. series of the form \(\sum _{n\ge 0} H_{n}(s) a_n\) where \(\sum _{n\ge 0} a_n = \phantom {}_p F_q(\ldots ;\pm 1)\). Some cases involving central binomial coefficients and \(H_n\) or \(H_{2n}\) have already been investigated by Campbell through integral transforms (see [6]); this section is devoted to showing how to deal with such twisted series through the FL machinery.

Rodrigues’ and Bonnet’s formulas lead to the FL-expansions

$$\begin{aligned} \log ^2(1-x)= & {} 2 + \sum _{n\ge 1}P_n(2x-1)\left[ 2\left( \frac{1}{n}+\frac{1}{n+1}\right) ^2+4\left( \frac{1}{n}+\frac{1}{n+1}\right) H_{n-1}\right] ,\\ \log (x)\log (1-x)= & {} (2-\zeta (2))-\sum _{n\ge 1}P_{2n}(2x-1)\frac{4n+1}{2n^2(2n+1)^2},\\ \frac{-\log (x)}{1-x}= & {} \zeta (2) - \sum _{n\ge 1}P_n(2x-1)(2n+1)\left[ 2\sum _{k=1}^{n}\frac{(-1)^{k+1}}{k^2}-\zeta (2)\right] , \end{aligned}$$

while the generating function for Legendre polynomials gives

$$\begin{aligned} \frac{1}{2\sqrt{x}} \log \left( \frac{1+\sqrt{x}}{4\sqrt{x}}\right) {\mathop {=}\limits ^{L^2(0,1)}}\sum _{n\ge 0}(-1)^n H_n P_n(2x-1). \end{aligned}$$
(18)

On the other hand we have

$$\begin{aligned}&\int _{0}^{1}x^n \log (x)\log (1-x)\,dx = \frac{2}{(n+1)^3}+\frac{H_n}{(n+1)^2}-\frac{\zeta (2)-H_{n}(2)}{n+1}, \\&\int _{0}^{1} x^n \log ^2(1-x)\,dx = \frac{H_{n+1}^2 + H_{n+1}(2)}{n+1}, \qquad \int _{0}^{1} x^n \frac{-\log x}{1-x}\,dx = \zeta (2)-H_{n}(2), \end{aligned}$$

hence these identities, through the FL machinery, allow an explicit evaluation of hypergeometric series whose main term depends on \(\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] \) or \(\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2\) and \(H_n, H_n^2, H_{n}(2)\) (hypergeometric series with a harmonic twist, according to the terminology introduced by Campbell in [7]). For instance

$$\begin{aligned} \int _{0}^{1}K(x)\frac{-\log x}{1-x}\,dx= & {} \frac{\pi }{2}\sum _{n\ge 0}\left( \zeta (2)-H_{n}(2)\right) \left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 \\= & {} 2\,\zeta (2)+\sum _{n\ge 1}\frac{4}{2n+1}\sum _{k>n}\frac{(-1)^{k+1}}{k^2}\\= & {} 4\int _{0}^{1}\frac{{\text {Li}}_2(-x^2)-{\text {Li}}_2(-1)}{1-x^2}\,dx \\= & {} 2\int _{0}^{1}\frac{{\text {Li}}_2(-x)-{\text {Li}}_2(-1)}{(1-x)\sqrt{x}}\,dx \\= & {} 4 \int _{0}^{1}\left[ \log (1+x)-\log (1-x)\right] \log (1+x^2)\frac{dx}{x}\\= & {} 4\pi K-7\zeta (3) \end{aligned}$$

by the functional identities for \({\text {Li}}_2\) and \({\text {Li}}_3\). Remarkably, there is a standard hypergeometric series which is closely related to \(\sum _{n\ge 0}\left( \zeta (2)-H_{n}(2)\right) \left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2\):

$$\begin{aligned} \sum _{n\ge 0}\frac{16^n}{(2n+1)^3 \left( {\begin{array}{c}2n\\ n\end{array}}\right) ^2} = \phantom {}_4 F_3\left( \tfrac{1}{2},1,1,1;\tfrac{3}{2},\tfrac{3}{2},\tfrac{3}{2};1\right) = -\pi K+\tfrac{7}{2}\zeta (3). \end{aligned}$$

This identity can be proved through the same technique outlined in [9]: by the Maclaurin series of the \(\arcsin \) function and the moments \( \int _{0}^{\pi /2}\left( \sin \theta \right) ^{2n+1}\,d\theta =\frac{1}{2n+1}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^{-1}\) we have:

$$\begin{aligned} \sum _{n\ge 0}\frac{16^n}{(2n+1)^3 \left( {\begin{array}{c}2n\\ n\end{array}}\right) ^2}= & {} \int _{0}^{\pi /2} \theta \log \tan \frac{\theta }{2}-{\text {Im}}\,{\text {Li}}_2(-e^{i\theta })+{\text {Im}}\,{\text {Li}}_2(e^{i\theta }) \,d\theta \\&{\mathop {=}\limits ^{\text {IBP}}}-\pi K+\tfrac{7}{2}\zeta (3). \end{aligned}$$

More simply,

$$\begin{aligned}&-\int _{0}^{1}K(x)\log (1-x)\,dx {\mathop {=}\limits ^{\text {Taylor}}} \frac{\pi }{2}\sum _{n\ge 0}\frac{H_{n+1}}{n+1}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 \\&\quad {\mathop {=}\limits ^{\text {FL}}} 2+\sum _{n\ge 1}\left( \frac{1}{n}+\frac{1}{n+1}\right) \frac{2}{(2n+1)^2}\\&\qquad = 8(1-\log (2)),\\&\quad -\int _{0}^{1}K(x)\log (1-\sqrt{x})\,dx {\mathop {=}\limits ^{\text {Taylor}}} \frac{\pi }{2}\sum _{n\ge 0}\frac{H_{2n+2}}{n+1}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 \\&\quad {\mathop {=}\limits ^{\text {FL}}} 3-\sum _{n\ge 1}\frac{2}{(2n+1)^2}\left[ \frac{(-1)^n}{2n(n+1)}-\frac{2n+1}{n(n+1)}\right] \\&\quad = 4+4K-6\log (2), \\&\sum _{n\ge 0}\frac{H_{2n}}{(n+1)(1-2n)}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 {\mathop {=}\limits ^{\text {FL}}} \frac{8}{\pi }\int _{0}^{1}\frac{\sqrt{x(1-x)}}{2\sqrt{x}}\log \left( \frac{1+\sqrt{x}}{4\sqrt{x}}\right) \,dx \\&\quad = \frac{4}{\pi }\int _{0}^{1}\log \left( \frac{1+\sqrt{x}}{4\sqrt{x}}\right) \sqrt{1-x}\,dx \\&\qquad \times \left[ \text {FL of } \sqrt{1-x},\;\log \left( 1+\tfrac{1}{\sqrt{x}}\right) \right] \; = \sum _{n\ge 0}\frac{8(-1)^n}{\pi (1-4n^2)(2n^2+5n+3)}-\frac{16\log (2)}{3\pi } \\&\quad = \frac{2}{3}+\frac{8}{3\pi }\left( 1-\log (2)\right) . \end{aligned}$$

Of course this approach can be combined with classical approaches based on integral transforms. Three instances are provided by the series

\(\sum _{n\ge 1}\frac{H_n}{n}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] \), \(\sum _{n\ge 1}\frac{H_n}{n}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2\) and \(\sum _{n\ge 1}\frac{1}{n^2}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2\):

$$\begin{aligned}&\sum _{n\ge 1}\frac{H_n}{n}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] = \zeta (2)-2\log ^2(2)+\frac{1}{\pi }\int _{0}^{\pi /2}\log ^2(1-\sin ^2\theta )\,d\theta = 2\,\zeta (2), \\&\quad \sum _{n\ge 1}\frac{1}{n^2}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 = \phantom {}_5 F_4\left( 1,1,1,\tfrac{3}{2},\tfrac{3}{2};2,2,2,2;1\right) \\&\quad {\mathop {=}\limits ^{\text {Taylor}}} -\frac{2}{\pi }\int _{0}^{\pi /2}\left( K(x)-\frac{\pi }{2}\right) \log (x)\frac{dx}{x}\\&\quad = \sum _{n\ge 0}\frac{(2n+1)(2(n+1)-1)}{4(n+1)^4}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2\\&\quad {\mathop {=}\limits ^{\text {Taylor}}} \frac{1}{\pi }\int _{0}^{1}\frac{d}{dx}E(x)\cdot \left( 4\log x+\log ^2 x\right) \,dx\\&\quad {\mathop {=}\limits ^{\text {FL}}} 1-\frac{2}{\pi }+\frac{1}{\pi }\sum _{n\ge 1}(-1)^n\left[ \frac{2 (2n+1)(1-2 n^2)}{n^2 (1+n)^2}+4\frac{2n+1}{n(n+1)}H_{n-1}\right] \\&\quad \times \left[ \int _{0}^{1}\frac{2x^{2n+2}}{1+x^2}\,dx-\frac{1}{2n+1}\right] \\&\quad = 1+\frac{-28+\frac{4\pi ^2}{3}+32\log (2)-16\log ^2(2)}{\pi }+\frac{1}{\pi }\int _{0}^{1}\frac{f(x)}{1+x^2}\,dx, \end{aligned}$$

where \( f(x)= 20x^2+(24-8x^2)\log (1-x^2)+4(x^2+1){\text {Li}}_2(x^2)+4(x^2-1)\log ^2(1-x^2).\) In particular \(\int _{0}^{1}\frac{f(x)}{1+x^2}\) is given by a linear combination with rational coefficients of \(1,\pi ,\log (2),K,\pi \log (2),\pi ^2,\log ^2(2)\) and

$$\begin{aligned} \int _{0}^{1}\frac{\log ^2(1-x^2)}{1+x^2}\,dx =\frac{5\pi ^3}{32}-4\,{\text {Im}}\,{\text {Li}}_3\left( \tfrac{1+i}{2}\right) -4K\log (2)+\frac{3\pi }{8}\log ^2(2), \end{aligned}$$

which is associated to Euler sums with weight 3 and allows to state that \(\phantom {}_5 F_4\Big (1,1,1,\tfrac{3}{2},\tfrac{3}{2};2,2,2,2;1\Big )\) has an explicit form in terms of the mentioned constants. The chain of equalities above is an application of the transformation formula introduced in our previous work [8], allowing to convert \(\int _{0}^{1}\left( K(x)-\frac{\pi }{2}\right) \frac{f(x)}{x}\,dx\) into \(\int _{0}^{1}\frac{d}{dx}E(x)\cdot {\widetilde{f}}(x)\,dx\). The application of such principle to the series \(\sum _{n\ge 1}\frac{H_n}{n}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] \) gives the following alternative derivation:

$$\begin{aligned} \sum _{n\ge 1}\frac{H_n}{n}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right]= & {} \sum _{n\ge 0}\frac{H_{n+1}}{n+1}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] \frac{2n+1}{2n+2}\\&\quad {\mathop {=}\limits ^{\text {Taylor}}} -\int _{0}^{1} \frac{1-\sqrt{1-x}}{x\sqrt{1-x}}\log (1-x)\,dx \\&\quad {\mathop {=}\limits ^{x\mapsto 1-x}} -\int _{0}^{1} \frac{1-\sqrt{x}}{(1-x)\sqrt{x}}\log (x)\,dx \\&\quad {\mathop {=}\limits ^{x\mapsto x^2}} -4\int _{0}^{1} \frac{1-x}{1-x^2}\log (x)\,dx\\= & {} 4\int _{0}^{1}\frac{-\log (x)}{1+x}\,dx = 4\sum _{n\ge 1}\frac{(-1)^{n+1}}{n^2} = 2\,\zeta (2), \end{aligned}$$

and the same procedure tackles

$$\begin{aligned}&\sum _{n\ge 1}\frac{H_n}{n 2^n}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] {\mathop {=}\limits ^{\text {FL}}} \int _{0}^{1}\frac{-\log (x)}{\sqrt{1+x}\left( \sqrt{2}+\sqrt{1+x}\right) }\,dx\\&\quad = \frac{1}{\sqrt{2}}\int _{0}^{1}\left( -\log x\right) \left( \frac{1}{\sqrt{1+x}}-\frac{1}{\sqrt{2}+\sqrt{1+x}}\right) \,dx \\&\quad = \frac{1}{\sqrt{2}}\sum _{n\ge 0}\frac{(-1)^n}{(n+1)^2}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] +\frac{1}{\sqrt{2}}\int _{0}^{1}\frac{\log (x)}{\sqrt{2}+\sqrt{1+x}}\,dx \end{aligned}$$

too, where the first term of the RHS is elementary and the second term depends on \({\text {Li}}_2(3-2\sqrt{2})\) by the substitution \(x\mapsto 1-2\left( \frac{2t}{1+t^2}\right) ^2\). The series with alternating signs \(\sum _{n\ge 0}(-1)^n H_{2n}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] \) equals \(\frac{1}{\sqrt{2}}\log \left( \frac{1+\sqrt{2}}{4}\right) \) by evaluating \(\sum _{n\ge 0} H_n P_n(2x-1)\) at \(x=\frac{1}{2}\). By directly exploiting the FL-expansion of \(\frac{\log (1-x)}{x}\) we have:

$$\begin{aligned}&\sum _{n\ge 1}\frac{H_n}{n}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 {\mathop {=}\limits ^{\text {Taylor}}} -\frac{2}{\pi }\int _{0}^{\pi /2}\left( K(x)-\frac{\pi }{2}\right) \log (1-x)\frac{dx}{x}\\&\quad {\mathop {=}\limits ^{\text {FL}}}\frac{2}{\pi }\left[ \zeta (2)\left( 2-\frac{\pi }{2}\right) +\sum _{n\ge 1}\frac{2(-1)^{n+1}}{2n+1}\left( -\zeta (2)+2\sum _{k=1}^{n}\frac{(-1)^{k+1}}{k^2}\right) \right] \\&\quad = \frac{8}{\pi }\sum _{n\ge 1}\frac{(-1)^{n+1}}{2n+1}\sum _{k=1}^{n}\frac{(-1)^{k+1}}{k^2}\\&\quad = \frac{8}{\pi }\int _{0}^{1}\frac{{\text {Li}}_2(x^2)}{1+x^2}\,dx\\&\quad = -\frac{5\pi ^2}{3}+\frac{64}{\pi }\, {\text {Im}}\,{\text {Li}}_3\left( \tfrac{1+i}{2}\right) +\frac{32}{\pi }K\log (2)-2\log ^2(2). \end{aligned}$$

In the last case the series obtained by replacing \(\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2\) by \(\frac{1}{\pi \left( n+\frac{1}{4}\right) }\) for any \(n\ge 2\) equals:

$$\begin{aligned} \frac{1}{4}+\sum _{n\ge 2}\frac{H_n}{\pi n\left( n+\frac{1}{4}\right) } = \frac{1}{4}+6\log (2)+\frac{18}{\pi }\log ^2(2)-\frac{\pi }{2}-\frac{4}{5\pi }-\frac{16}{\pi }K. \end{aligned}$$

Now we may tackle two similar sums, twisted by factors \(H_n^2, H_{n}(2)\).

$$\begin{aligned}&\int _{0}^{1}K(x)\log (x)\log (1-x)\,dx\\&\quad {\mathop {=}\limits ^{\text {Taylor}}} \frac{\pi }{2}\sum _{n\ge 0}\left( \frac{H_{n+1}}{(n+1)^2}-\frac{\zeta (2)-H_{n+1}(2)}{n+1}\right) \left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2\\&\quad {\mathop {=}\limits ^{\text {FL}}} (4-2\,\zeta (2))-\sum _{n\ge 1}\frac{1}{n^2(2n+1)^2(4n+1)}\\&\quad = 48-8\pi -32\log (2), \\&\quad \int _{0}^{1}K(x)\log ^2(1-x)\,dx {\mathop {=}\limits ^{\text {Taylor}}} \frac{\pi }{2}\sum _{n\ge 0}\frac{H_{n+1}^2+H_{n+1}(2)}{n+1}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 \\&\quad {\mathop {=}\limits ^{\text {FL}}} 4+\sum _{n\ge 1}\frac{2}{(2n+1)^2}\left[ 2\left( \frac{1}{n}+\frac{1}{n+1}\right) ^2+4\left( \frac{1}{n}+\frac{1}{n+1}\right) H_{n-1}\right] \\&\quad = -8+\frac{4\pi ^2}{3}+8\sum _{n\ge 1}\frac{H_{n-1}}{n(n+1)(2n+1)}\\&\quad = 48-\frac{4\pi ^2}{3}-64\log (2)+32\log ^2(2), \\&\quad \frac{\pi }{2}\sum _{n\ge 0}\frac{H_{n+1}}{(n+1)^2}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2\\&\quad {\mathop {=}\limits ^{\text {Taylor}}} -\int _{0}^{1}\left[ 4\frac{d}{dx}E(x)+2\,K(x)\right] \log (1-x)\,dx\\&\quad {\mathop {=}\limits ^{\text {FL}}}(8-2\pi )+\sum _{n\ge 1}\left( \frac{1}{n}+\frac{1}{n+1}\right) \left[ \frac{4}{(2n+1)^2}-\frac{4}{2n+1}+8\int _{0}^{1}\frac{u^{2n+2}}{1+u^2}\,du\right] \\&\quad = 16-2\pi -16\log (2)-8\int _{0}^{1}\frac{u^2+(1+u^2)\log (1-u^2)}{1+u^2}\,du\\&\quad = 24-32\log (2). \end{aligned}$$

By combining these integrals/series we immediately get

$$\begin{aligned}&\sum _{n\ge 0}\frac{H_{n+1}^2}{n+1}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 = 16+\frac{48}{\pi }-\frac{10 \pi }{3}-\frac{128\log (2)}{\pi }+\frac{64\log ^2(2)}{\pi },\\&\sum _{n\ge 0}\frac{H_{n+1}(2)}{n+1}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 = -16+\frac{48}{\pi }+\frac{2 \pi }{3}. \end{aligned}$$

Many other identities involving \(H_n\) or \({\mathscr {H}}_n\) can be derived through the FL-method. For instance, we may consider that by differentiating Euler’s Beta function we have

$$\begin{aligned} \int _{0}^{1}\frac{\log ^2(x)}{\sqrt{x(1-x)}}\,dx = \frac{\pi ^3}{3}+4\pi \log ^2(2), \end{aligned}$$

where the LHS is at the same time

$$\begin{aligned} 2\pi + \pi \sum _{n\ge 1}\left[ 2\left( \frac{1}{2n}+\frac{1}{2n+1}\right) ^2+4\left( \frac{1}{2n}+\frac{1}{2n+1}\right) H_{2n-1}\right] \cdot \left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 \end{aligned}$$

and

$$\begin{aligned} 32\sum _{n\ge 0}(-1)^n\left[ \frac{2{\mathscr {H}}_n^2}{2n+1}-\frac{2{\mathscr {H}}_n}{(2n+1)^2}+\frac{1}{(2n+1)^3}\right] \end{aligned}$$

due to the FL-expansions of \(\log ^2(x),\frac{1}{\sqrt{x(1-x)}},\frac{\log ^2(x)}{\sqrt{x}}\) and \(\frac{1}{\sqrt{1-x}}\).

In particular the series

$$\begin{aligned} \sum _{n\ge 1}\left( \frac{1}{2n}+\frac{1}{2n+1}\right) H_{2n}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 \end{aligned}$$

is given by an algebraic combination of \(1,\log (2),\pi ,K\) and \({\text {Im}}\,{\text {Li}}_3\left( \tfrac{1+i}{2}\right) \).

Similarly,

$$\begin{aligned} \int _{0}^{1}\frac{-\log ^3(x)}{\sqrt{x(1-x)}}\,dx = 2\pi ^3\log (2)+8\pi \log ^3(2)+12\pi \zeta (3) \end{aligned}$$

holds by differentiation of a Beta function, and the FL-expansion of \(\frac{-\log ^3(x)}{\sqrt{x}}\) can be computed through the same technique we used for the FL-expansion of \(\frac{\log ^2(x)}{\sqrt{x}}\), namely Rodrigues’ formula and recurrence relations. They lead to the equality in \(L^2(0,1)\) between \(-\frac{\log ^3(x)}{\sqrt{x}}\) and

$$\begin{aligned} 32\sum _{n\ge 0}(-1)^n P_n(2x-1)\left[ 4{\mathscr {H}}_n^3 + 2{\mathscr {H}}_{n}(3)-\frac{6{\mathscr {H}}_n^2}{(2n+1)}+\frac{6{\mathscr {H}}_n}{(2n+1)^2}-\frac{3}{(2n+1)^3}\right] , \end{aligned}$$

hence the explicit value of \(\sum _{n\ge 0}\frac{(-1)^n {\mathscr {H}}_{n}(3)}{2n+1}\) can be computed from the previous integral and the FL-expansion of \(\log ^3(x)\).

Now we have an important remark. According to the niceness criterion outlined in [8], we may denote through \({\mathscr {N}}\) the class of (twisted) hypergeometric \(\phantom {}_{p+1}F_p(x)\) functions such that the coefficients of their FL-expansions are the coefficients of the Maclaurin series of a (twisted) \(\phantom {}_{q+1}F_q(x)\) function. If \(\max (p,q)\le 3\), many interesting identities are produced by interpreting the integral over (0, 1) of a Maclaurin series as a suitable inner product in \(L^2(0,1)\). As already remarked, assuming \(a+3,b+3\in \frac{1}{4}{\mathbb {N}}\) and \(u\in (-1,1)\) all the following functions belong to \({\mathscr {N}}\):

$$\begin{aligned}&\frac{1}{\sqrt{(1+u)^2-4ux}},\quad x^{a}(1-x)^b, \quad \log (x), \quad \log ^2(x), \quad \log (1-\sqrt{x}),\quad \frac{\log (x)}{\sqrt{x}},\\&\frac{\log ^2(x)}{\sqrt{x}},\quad K(x),\quad E(x),\quad {\mathcal {J}}(x),\quad \frac{d}{dx}E(x),\quad \frac{\arcsin (\sqrt{x})}{\sqrt{x}} \end{aligned}$$

and \({\mathscr {N}}\) is closed with respect to \(f(x)\mapsto f(1-x), x\cdot f(1-x), \int f(x)\,dx\) by Bonnet’s recursion formulas.

Theorem 4

\({\text {Li}}_2(x)\in {\mathscr {N}}.\)

Proof

It is straightforward to check that \(\int _{0}^{1}{\text {Li}}_2(x)\,dx = \zeta (2)-1\) and that

$$\begin{aligned} \int _{0}^{1}{\text {Li}}_2(x)P_n(2x-1)\,dx = \frac{1}{n^2(n+1)^2} \end{aligned}$$

holds for any \(n\in \{1,2,3,4,5\}\). This leads to the following conjectural form for the FL-expansion of the dilogarithm [1, 21]:

$$\begin{aligned} {\text {Li}}_2(x) = \left( \zeta (2)-1\right) + \sum _{n\ge 1}\left( \frac{1}{n^2}-\frac{1}{(n+1)^2}\right) P_n(2x-1) \end{aligned}$$
(19)

which can be proved to be correct through the following approach: by applying the operator \(x\cdot \frac{d}{dx}\) to both sides of (19) and exploiting Bonnet’s recursion formulas, one finds \(-\log (1-x)\) in the LHS and \(1+\sum _{n\ge 1}\left( \frac{1}{n}+\frac{1}{n+1}\right) P_n(2x-1)\) in the RHS. By Rodrigues’ formula we know that the last series is indeed the FL-expansion of \(-\log (1-x)\). \(\square \)

Corollary 3

Despite their appearance, all the following integrals are very simple to compute:

$$\begin{aligned}&\int _{0}^{1}{\text {Li}}_2^2(x)\,dx, \;\; \int _{0}^{1}{\text {Li}}_2^2(\sqrt{x})\,dx, \;\; \int _{0}^{1}{\text {Li}}_2(x){\text {Li}}_2(1-x)\,dx, \;\; \int _{0}^{1}{\text {Li}}_2(x) K(x)\,dx,\\&\int _{0}^{1}\frac{{\text {Li}}_2(x)}{\sqrt{x(1-x)}}\,dx, \quad \int _{0}^{1}\frac{{\text {Li}}_2(x)}{\root 4 \of {x(1-x)}}\,dx,\quad \int _{0}^{1}{\text {Li}}_2(x)\log (x)\log (1-x)\,dx. \end{aligned}$$

Proof

The integral \(\int _{0}^{1}{\text {Li}}_2^2(x)\,dx\) equals

$$\begin{aligned} \sum _{m,n\ge 1}\frac{1}{m^2 n^2 (m+n+1)}=\sum _{s\ge 2}\frac{1}{s+1}\sum _{a=1}^{s-1}\frac{1}{a^2(s-a)^2} = \sum _{s\ge 2}\frac{2s H_{s-1}(2)+4 H_{s-1}}{s^3(s+1)} \end{aligned}$$

and the RHS can be computed through standard Euler sums. As an alternative, the LHS can be computed by integration by parts, since \(\int _{0}^{1}{\text {Li}}_2(x)\log (1-x)\,dx = 3-\zeta (2)-2\zeta (3)\) and \(\int {\text {Li}}_2(x)\,dx = C+x\,{\text {Li}}_2(x)-(1-x)\log (1-x)-x\). FL-expansions provide a more efficient derivation, since by Theorem 4 the LHS equals

$$\begin{aligned} \left( \zeta (2)-1\right) ^2 + \sum _{n\ge 1}\frac{2n+1}{n^4(n+1)^4} {\mathop {=}\limits ^{\text {PFD}}} 6-2\zeta (2)+\zeta (2)^2-4\zeta (3). \end{aligned}$$

Similarly the integral \(\int _{0}^{1}{\text {Li}}_2^2(\sqrt{x})\,dx\) equals

$$\begin{aligned} \sum _{m,n\ge 1}\frac{2}{m^2 n^2 (m+n+2)}=\sum _{s\ge 2}\frac{2}{s+2}\sum _{a=1}^{s-1}\frac{1}{a^2(s-a)^2} = \sum _{s\ge 2}\frac{4s H_{s-1}(2)+8 H_{s-1}}{s^3(s+2)} \end{aligned}$$

and by \(\text {IBP}\) or Euler sums both sides equal \(\frac{25}{8}-\frac{\pi ^2}{4}+\frac{\pi ^4}{36}-2\,\zeta (3)\). On the other hand the computation of the FL-expansion of \(x\,{\text {Li}}_2(x)\) provides an equivalent series in which harmonic numbers do not appear.

Through Euler’s Beta function, the integral \(\int _{0}^{1}{\text {Li}}_2(x){\text {Li}}_2(1-x)\,dx\) can be written as:

$$\begin{aligned} \sum _{m,n\ge 1}\frac{1}{m^2 n^2 (m+n+1) \left( {\begin{array}{c}m+n\\ n\end{array}}\right) }=\sum _{s\ge 2}\frac{1}{s^3(s+1)}\sum _{a=1}^{s-1}\frac{s+2a}{a^2 \left( {\begin{array}{c}s\\ a\end{array}}\right) } \end{aligned}$$

where the equality \(\sum _{a=0}^{n}\left( {\begin{array}{c}n\\ a\end{array}}\right) ^{-1}=\frac{n+1}{2^{n+1}}\sum _{k=1}^{n+1}\frac{2^k}{k}\) involving “generalized” harmonic numbers follows from Euler’s Beta function too. The FL-expansion of \({\text {Li}}_2\) simply produces the equality

$$\begin{aligned} \int _{0}^{1}{\text {Li}}_2(x){\text {Li}}_2(1-x)\,dx = \left( \zeta (2)-1\right) ^2 + \sum _{n\ge 1}\frac{(-1)^n (2n+1)}{n^4(n+1)^4}{\mathop {=}\limits ^{\text {PFD}}} 6-\frac{2 \pi ^2}{3}+\frac{\pi ^4}{120}. \end{aligned}$$

The fourth integral can be written as

$$\begin{aligned} \int _{0}^{1} K(x){\text {Li}}_2(x)\,dx = \frac{\pi }{2}\sum _{n\ge 0}\left( \frac{\zeta (2)}{n+1}-\frac{H_{n+1}}{(n+1)^2}\right) \left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2. \end{aligned}$$

Given the FL-expansions of K(x) and \({\text {Li}}_2(x)\), both sides simply equal

$$\begin{aligned} 2\left( \zeta (2)-1\right) +\sum _{n\ge 1}\frac{2}{(2n+1)^2}\left( \frac{1}{n^2}-\frac{1}{(n+1)^2}\right) {\mathop {=}\limits ^{\text {PFD}}} -24+32\log (2)+\frac{\pi ^2}{3}. \end{aligned}$$

The fifth integral can be represented as

$$\begin{aligned} \int _{0}^{1}\frac{{\text {Li}}_2(x)}{\sqrt{x(1-x)}}\,dx = \sum _{n\ge 0}\left( \frac{2\zeta (2)}{2n+1}-\frac{4H_{n+1/2}}{(2n+1)^2}\right) \left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] \end{aligned}$$

and \(\int _{0}^{\pi /2}{\text {Li}}_2(\sin ^2\theta )\,d\theta =\int _{0}^{\pi /2}{\text {Li}}_2(\cos ^2\theta )\,d\theta \) can be proved to be equal to \(\frac{\pi ^3}{12}-\pi \log ^2(2)\) through the dilogarithm reflection formulas. On the other hand, by the FL-expansions of \({\text {Li}}_2(x)\) and \(\frac{1}{\sqrt{x(1-x)}}\) both sides equal

$$\begin{aligned} \pi (\zeta (2)-1)+\pi \sum _{n\ge 1}\left( \frac{1}{(2n)^2}-\frac{1}{(2n+1)^2}\right) \left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 \end{aligned}$$

and the hypergeometric \(\phantom {}_{p+1} F_{p}(1)\) values mentioned by the last line have already been computed through the FL machinery. In particular we get

$$\begin{aligned}&\sum _{n\ge 0}\frac{H_{n+1/2}}{(2n+1)^2}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] =\frac{\pi }{2}\log ^2(2), \\&\sum _{n\ge 0}\frac{{\mathscr {H}}_n}{(2n+1)^2}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] =\frac{3\pi }{4}\log ^2(2). \end{aligned}$$

The sixth integral equals

$$\begin{aligned}&\int _{0}^{1}\frac{{\text {Li}}_2(x)}{\root 4 \of {x(1-x)}}\,dx = \frac{\varGamma \left( \frac{3}{4}\right) }{\pi \sqrt{2}}\sum _{n\ge 0}\frac{\varGamma \left( n+\frac{1}{4}\right) }{n!}\left( \frac{\zeta (2)}{n+3/4}-\frac{H_{n+3/4}}{(n+3/4)^2}\right) \\&\quad = \frac{\pi ^{3/2}}{3}\varGamma \left( \tfrac{3}{4}\right) ^2 -\frac{\varGamma \left( \frac{3}{4}\right) }{\pi \sqrt{2}}\sum _{n\ge 0}\frac{\varGamma \left( n+\frac{1}{4}\right) H_{n+3/4}}{(n+3/4)^2 n!} \end{aligned}$$

and by the FL-expansions of \({\text {Li}}_2(x)\) and \(\left[ x(1-x)\right] ^{-1/4}\) the LHS can be written as

$$\begin{aligned} \frac{4\pi ^{3/2}}{\varGamma \left( \frac{1}{4}\right) ^2}\left( \zeta (2)-1\right) +\frac{4\pi ^{3/2}}{\varGamma \left( \frac{1}{4}\right) ^2}\sum _{n\ge 1}\frac{1}{(2n)^2(2n+1)^2}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] \end{aligned}$$

only involving elementary hypergeometric functions. By \(\text {PFD}\) the final outcome is

$$\begin{aligned} \int _{0}^{1}\frac{{\text {Li}}_2(x)}{\root 4 \of {x(1-x)}}\,dx = \frac{2\pi ^{3/2}}{\varGamma \left( \frac{1}{4}\right) ^2}\left( \frac{5 \pi ^2}{12}+(\pi -4)\left( 2+\log (2)\right) -\log ^2(2)\right) \end{aligned}$$

leading to a closed form for \(\phantom {}_4 F_3\left( 1,1,1,\tfrac{7}{4};2,2,\tfrac{5}{2};1\right) \). The seventh integral is related to an Euler sum with weight four:

$$\begin{aligned} \int _{0}^{1}{\text {Li}}_2(x)\log (x)\log (1-x)\,dx = \sum _{n\ge 1}\left( \frac{H_{n+1}}{n^2(n+1)^2}-\frac{\zeta (2)-H_{n+1}^{(2)}}{n^2(n+1)}\right) . \end{aligned}$$

Of course the similarity between the FL expansions of \({\text {Li}}_2(x)\) and \(\log (x)\log (1-x)\) (the latter only involving Legendre polynomials with even degree, by symmetry) is not accidental at all, but induced by the dilogarithm reflection formula. In particular we may remove \(H_{n+1}\) and \(H_{n+1}(2)\) from the RHS of the previous line either by noticing that

$$\begin{aligned}&2\int _{0}^{1}{\text {Li}}_2(x)\log (x)\log (1-x)\,dx\\&\quad = \int _{0}^{1}\left( \zeta (2)-\log (x)\log (1-x)\right) \log (x)\log (1-x)\,dx\\&\quad = \zeta (2)\left. \frac{\partial ^2}{\partial a\,\partial b}\left( \frac{\varGamma (a+1)\varGamma (b+1)}{\varGamma (a+b+2)}\right) -\frac{\partial ^4}{\partial ^2 a\,\partial ^2 b}\left( \frac{\varGamma (a+1)\varGamma (b+1)}{\varGamma (a+b+1)}\right) \right| _{(a,b)=(0,0)} \end{aligned}$$

or by noticing that

$$\begin{aligned}&\int _{0}^{1}{\text {Li}}_2(x)\log (x)\log (1-x)\,dx\\&\quad {\mathop {=}\limits ^{\text {FL}}} (\zeta (2)-1)(2-\zeta (2))-\sum _{n\ge 1}\frac{1}{2n^2(2n+1)^2}\left( \frac{1}{(2n)^2}-\frac{1}{(2n+1)^2}\right) \\&\quad {\mathop {=}\limits ^{\text {PFD}}} -12+\frac{5\pi ^2}{6}+4\,\zeta (3)-\frac{\pi ^4}{120}. \end{aligned}$$

\(\square \)

Corollary 4

Since \(\int _{0}^{1}{\text {Li}}_2(x) x^n\,dx = \frac{\zeta (2)}{n+1}-\frac{H_{n+1}}{(n+1)^2}\), the FL-expansion of the dilogarithm function can be efficiently used in the computation of many twisted hypergeometric series involving \(H_n\).

Proof

Since \(\int _{0}^{1}K(x)\,dx = \frac{\pi }{2}\sum _{n\ge 0}\frac{1}{(n+1)}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 = 2\), the computation of \(\int _{0}^{1}K(x){\text {Li}}_2(x)\,dx\) performed in the previous corollary immediately leads to

$$\begin{aligned} \sum _{n\ge 0}\frac{H_{n+1}}{(n+1)^2}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 = \frac{48-64\log (2)}{\pi }. \end{aligned}$$

Analogously, the FL machinery provides an alternative proof for some instances of Euler’s classical result about \(\sum _{n\ge 1}\frac{H_n}{n^s}\), which is Theorem 2.2 in [11]. For instance

$$\begin{aligned}&\int _{0}^{1}{\text {Li}}(x)^2\,dx = \sum _{n\ge 0}\int _{0}^{1}\frac{x^{n+1}}{(n+1)^2}{\text {Li}}_2(x)\,dx\\&\quad = \sum _{n\ge 0}\frac{1}{(n+1)^2}\left( \frac{\zeta (2)}{n+1}-\frac{H_{n+1}}{(n+1)^2}\right) =\zeta (2)\zeta (3)-\sum _{n\ge 1}\frac{H_n}{n^4}. \end{aligned}$$

\(\square \)

Theorem 5

\({\text {Li}}_3(x)\in {\mathscr {N}}.\)

Proof

We start by computing the moments of \({\text {Li}}_3(x)\) over (0, 1):

$$\begin{aligned} \int _{0}^{1}x^n{\text {Li}}_3(x)\,dx= & {} \sum _{m\ge 1}\frac{1}{m^3(m+n+1)}\nonumber \\&{\mathop {=}\limits ^{\text {PFD}}}\frac{\zeta (3)}{n+1}-\frac{\zeta (2)}{(n+1)^2}+\frac{H_{n+1}}{(n+1)^3}.\end{aligned}$$
(20)

Since

$$\begin{aligned} \sum _{k=0}^{n}\left( {\begin{array}{c}n\\ k\end{array}}\right) \left( {\begin{array}{c}n+k\\ k\end{array}}\right) \frac{(-1)^k}{k+1}=0,\quad \sum _{k=0}^{n}\left( {\begin{array}{c}n\\ k\end{array}}\right) \left( {\begin{array}{c}n+k\\ k\end{array}}\right) \frac{(-1)^k}{(k+1)^2}=\frac{1}{n(n+1)} \end{aligned}$$

for any \(n\ge 1\) we have

$$\begin{aligned} \int _{0}^{1} {\text {Li}}_3(x)P_n(2x-1)\,dx = (-1)^n\left[ u_n - \frac{\zeta (2)}{n(n+1)}\right] \end{aligned}$$

and

$$\begin{aligned} {\text {Li}}_3(x)= & {} \left( 1-\zeta (2)+\zeta (3)\right) + \sum _{n\ge 1}(-1)^n(2n+1)\left[ u_n - \frac{\zeta (2)}{n(n+1)}\right] P_n(2x-1)\\= & {} \left( 1-\zeta (2)+\zeta (3)\right) +\frac{2\pi ^2-15}{8}P_1(2x-1) + \sum _{n\ge 2}a_n P_n(2x-1). \end{aligned}$$

On the other hand \(x\cdot {\text {Li}}_3(x)-\int {\text {Li}}_3(x)\,dx = x\cdot {\text {Li}}_2(x)-x-(1-x)\log (1-x)\) and the FL-expansion of the RHS is known. In particular we may find the unknown coefficients \(u_n\), associated to the sums

$$\begin{aligned} \sum _{k=0}^{n}\left( {\begin{array}{c}n\\ k\end{array}}\right) \left( {\begin{array}{c}n+k\\ k\end{array}}\right) \frac{(-1)^k H_{k+1}}{(k+1)^3} \end{aligned}$$

by solving a recurrence relation induced by Bonnet’s formulas.

Indeed, if \(f(x)=\sum a_n P_n(2x-1)\) and \(x\cdot f(x)-\int f(x)\,dx=\sum b_n P_n(2x-1)\),

we have

$$\begin{aligned} b_n = \frac{n-1}{2(2n-1)}a_{n-1}+\frac{1}{2}a_n+\frac{n+2}{2(2n-3)}a_{n+1} \end{aligned}$$

for any \(n\ge 2\). By computing the FL-expansion of \(x\cdot {\text {Li}}_2(x)-(1-x)\log (1-x)-x\) we get

$$\begin{aligned} \frac{n-1}{2(2n-1)}a_{n-1}+\frac{1}{2}a_n+\frac{n+2}{2(2n+3)}a_{n+1} = \frac{2(2n+1)(n^2+n+1)}{(n-1)^2 n^2 (n+1)^2 (n+2)} \end{aligned}$$

whose solution \(a_n\) can be computed through the WZ-method [25]:

$$\begin{aligned} \frac{(2n+1)\left( n^4+n^3+3n^2+8n+4\right) }{n^3 (n+1)^3 (n+2)^2} + \frac{(2n+1)(-1)^n}{2n(n+1)}\left[ 4\sum _{k=1}^{n+2}\frac{(-1)^{k+1}}{k^2}-\frac{\pi ^2}{3}\right] .\end{aligned}$$
(21)

The last line provides an explicit expression for the FL-expansion of \({\text {Li}}_3\) in terms of an alternating quadratic sum (a tail for the classical series defining \(\eta (2)\)) and proves the following identity for any \(n\ge 2\):

$$\begin{aligned}&\sum _{k=0}^{n}\left( {\begin{array}{c}n\\ k\end{array}}\right) \left( {\begin{array}{c}n+k\\ k\end{array}}\right) \frac{(-1)^k H_{k+1}}{(k+1)^3}\nonumber \\&\quad =\frac{(-1)^n (n^4+n^3+3n^2+8n+4)}{n^3 (n+1)^3 (n+2)^2} + \frac{2}{n(n+1)}\sum _{k=1}^{n+2}\frac{(-1)^{k+1}}{k^2}.\end{aligned}$$
(22)

\(\square \)

Corollary 5

$$\begin{aligned} \int _{0}^{1}\frac{{\text {Li}}_3(x)}{\sqrt{1-x}}\,dx= & {} \frac{4}{3}\phantom {}_4 F_3\left( 1,1,1,1;2,2,\tfrac{5}{2};1\right) \\= & {} \sum _{n\ge 0}\left( \frac{\zeta (3)}{n+1}-\frac{\zeta (2)}{(n+1)^2}+\frac{H_{n+1}}{(n+1)^3}\right) \left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] \\= & {} 2\zeta (3)-4\zeta (2)+4\zeta (2)\log (2)+\sum _{n\ge 0}\frac{H_{n+1}}{(n+1)^3}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] \\= & {} \sum _{n\ge 1}\frac{2\cdot 4^n}{(2n+1)n^3 \left( {\begin{array}{c}2n\\ n\end{array}}\right) }\\= & {} 16 - 2\pi ^2 +2\pi ^2 \log (2)-7\zeta (3). \end{aligned}$$

Proof

By the FL-expansion of \({\text {Li}}_3\) the given integral equals

$$\begin{aligned} -\frac{13}{18}-\frac{\pi ^2}{2}+6\zeta (3)+2\int _{0}^{1}\frac{x\log x}{x+1}\left( 2 x-x^2+2(1-x)\log (1-x)\right) \,dx \end{aligned}$$

since

$$\begin{aligned} (-1)^n\left[ -\frac{\pi ^2}{3}+4\sum _{k=1}^{n+2}\frac{(-1)^{k+1}}{k^2}\right] =\int _{0}^{1} x^n\cdot \frac{4x^2\log (x)}{x+1}\,dx. \end{aligned}$$

In particular the FL method allows a conversion into an elementary integral, only involving \(\log (x),\log (1-x),x\) and \(1\pm x\). It also proves that

$$\begin{aligned} \sum _{n\ge 0}\frac{H_{n+1}}{(n+1)^3}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] =16-\frac{4\pi ^2}{3}(1-\log (2))-9\zeta (3). \end{aligned}$$

\(\square \)

Corollary 6

$$\begin{aligned} \int _{0}^{1}{\text {Li}}_3(x) K(x)\,dx= & {} \frac{\pi }{2}\sum _{n\ge 0}\left( \frac{\zeta (3)}{n+1}-\frac{\zeta (2)}{(n+1)^2}+\frac{H_{n+1}}{(n+1)^3}\right) \left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2\\= & {} 2\zeta (3)+\frac{\pi ^3}{3}-\frac{4\pi ^2}{3}+\frac{\pi }{2}\sum _{n\ge 0}\frac{H_{n+1}}{(n+1)^3}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2\\= & {} 64-\frac{4 \pi ^2}{3}-96\log (2)+2\zeta (3)-3\pi ^3+64K\log (2)\\ {}- & {} 4\pi \log ^2(2)+128\,{\text {Im}}\,{\text {Li}}_3\left( \tfrac{1+i}{2}\right) . \end{aligned}$$

Proof

By the FL-expansion of \({\text {Li}}_3\) the given integral equals

$$\begin{aligned}&\frac{451}{9}-\frac{22}{9}\pi ^2-\frac{352}{9}\log (2)+2\zeta (3)\\&\quad +\int _{0}^{1}\frac{4x\log (x)}{x+1}\left( 3 x-4\sqrt{x}\,{\text {arctanh}}\left( (\right) \sqrt{x})-(x+1)\log (1-x)\right) \,dx \end{aligned}$$

which after some elementary manipulations becomes

$$\begin{aligned} 64-\frac{4 \pi ^2}{3}-96\log (2)+2\zeta (3)+32 \int _{0}^{1}\log \left( \frac{1-x}{1+x}\right) \frac{\log (x)}{1+x^2}\,dx. \end{aligned}$$

The functional identities for \({\text {Li}}_3\) allow to turn the last line into

$$\begin{aligned} 64-\frac{4 \pi ^2}{3}-96\log (2)+2\zeta (3)-3\pi ^3+64K\log (2)-4\pi \log ^2(2)+128\,{\text {Im}}\,{\text {Li}}_3\left( \tfrac{1+i}{2}\right) \end{aligned}$$

proving the claim and the equality

$$\begin{aligned}&\frac{\pi }{2}\sum _{n\ge 0}\frac{H_{n+1}}{(n+1)^3}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2\\&\quad = 64 - \frac{10\pi ^3}{3}+ 128\,{\text {Im}}\,{\text {Li}}_3\left( \tfrac{1+i}{2}\right) - 96\log (2) + 64 K \log (2) - 4\pi \log ^2(2). \end{aligned}$$

\(\square \)

3 Further remarks

In the previous section we have seen that FL-expansions reduce the problem of evaluating

$$\begin{aligned} \phantom {}_{\mu +3} F_{\mu +2}\left( \tfrac{1}{2},\tfrac{1}{2},1,1,\ldots ;2,2,2,\ldots ;1\right) =\sum _{n\ge 0}\frac{1}{(n+1)^{\mu +2}}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2,\quad \mu \in {\mathbb {N}} \end{aligned}$$

to the problem of evaluating

$$\begin{aligned} \int _{0}^{\pi /4}\log ^\mu (\cos \theta )\,d\theta= & {} \sum _{n\ge 0}\frac{1}{2^n(2n+1)^{\mu +1}}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] \\= & {} \phantom {}_{\mu +2} F_{\mu +1}\left( \tfrac{1}{2},\tfrac{1}{2},\ldots ;\tfrac{3}{2},\tfrac{3}{2},\ldots ;\tfrac{1}{2}\right) . \end{aligned}$$

We have to stress that the LHS of the last line is related to twisted hypergeometric series by a classical approach, which is to consider some combinatorial/hypergeometric identities like the Chu-Vandermonde or the Dougall-Dixon ones, then differentiate them with respect to one/some of their parameters. This approach allowed Wang and Jia in [24] to prove a large number of identies involving generalized harmonic numbers and binomial transforms. In our case we may consider that the formula

$$\begin{aligned}&\int _{0}^{\pi /4}\left( \cos \theta \right) ^a\,d\theta = \frac{\sqrt{\pi }\,\varGamma \left( \frac{a}{2}+\frac{1}{2}\right) }{2\,\varGamma \left( \frac{a}{2}+1\right) }-\frac{1}{(a+1) 2^{\frac{a+1}{2}}}\,\phantom {}_2 F_1\left( \tfrac{1}{2},\tfrac{a+1}{2};\tfrac{a+3}{2};\tfrac{1}{2}\right) \nonumber \\&\quad = \frac{\sqrt{\pi }\,\varGamma \left( \frac{a}{2}+\frac{1}{2}\right) }{2\,\varGamma \left( \frac{a}{2}+1\right) }-\frac{1}{(a+1) 2^{\frac{a+1}{2}}}\sum _{n\ge 0}\frac{1}{8^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \left[ 1-\frac{2n}{2n+a+1}\right] \end{aligned}$$
(23)

follows from the substitution \(\theta \mapsto \frac{\varphi }{2}\) and the equality \(\cos \left( \frac{\varphi }{2}\right) =\frac{1+\cos (\varphi )}{2}\), whereas

$$\begin{aligned} \int _{0}^{\pi /4}\left( \cos \theta \right) ^a\,d\theta = \phantom {}_2 F_1\left( \tfrac{1}{2},\tfrac{a+2}{2};\tfrac{3}{2};-1\right) =\sum _{n\ge 0}\frac{(-1)^n }{(2n+1)n!}\cdot \frac{\varGamma \left( n+\frac{a}{2}+1\right) }{\varGamma \left( \frac{a}{2}+1\right) } \end{aligned}$$
(24)

follows from the substitution \(\theta \mapsto \arctan u\). By differentiating the right-hand sides of (23) and (24) multiple times with respect to a, then performing an evaluation at \(a=0\), we get that the values of \(\phantom {}_{\mu +2} F_{\mu +1}\left( \tfrac{1}{2},\tfrac{1}{2},\ldots ;\tfrac{3}{2},\tfrac{3}{2},\ldots ;\tfrac{1}{2}\right) \) or \(\int _{0}^{\pi /4}\log ^\mu (\cos \theta )\,d\theta \) provide explicit forms both for \(\sum _{n\ge 0}\frac{1}{(n+1)^{\mu +2}}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2\) and for the twisted sums

$$\begin{aligned}&\sum _{n\ge 0}\frac{(-1)^n}{(2n+1)}H_n,\qquad \sum _{n\ge 0}\frac{(-1)^n}{(2n+1)}\left( H_n^2-H_{n}(2)\right) ,\nonumber \\&\sum _{n\ge 0}\frac{(-1)^n}{(2n+1)}\left( H_n^3-3 H_n H_{n}(2)+2H_{n}(3)\right) , \end{aligned}$$
(25)

the latter being clearly related to \(\sum _{n\ge 0}\frac{(-1)^n {\mathscr {H}}_n^3}{2n+1}\), which has been crucial for the evaluation of \(\sum _{n\ge 0}\frac{1}{(2n+1)^3}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 =\phantom {}_5 F_4\left( \tfrac{1}{2},\tfrac{1}{2},\tfrac{1}{2},\tfrac{1}{2},\tfrac{1}{2};1,\tfrac{3}{2},\tfrac{3}{2},\tfrac{3}{2};1\right) .\) By exploiting the identity \(\log \left( 2\sin \frac{x}{2}\right) =\log (1-e^{ix})+\frac{i}{2}(\pi -x)\), Shalev has shown in [17] that

$$\begin{aligned} \int _{0}^{\pi /4} \log ^3(\sin \theta )\,d\theta= & {} 3\,{\text {Im}}\,{\text {Li}}_4(1-i)-\frac{25\pi ^3}{256}\log (2)+\frac{3}{2}\log (2)\,{\text {Im}}\,{\text {Li}}_3\left( \tfrac{1+i}{2}\right) \\&-\frac{3K}{8}\log ^2(2)-\frac{17\pi }{64}\log ^3(2)-\frac{3\pi }{8}\zeta (3)+\frac{3}{4}\beta (4) \end{aligned}$$

and by differentiating the Euler Beta function three times it follows that

$$\begin{aligned} \int _{0}^{\pi /4} \log ^3(\cos \theta )\,d\theta= & {} -\frac{7\pi ^3}{256}\log (2)-\frac{15\pi }{64}\log ^3(2)+\frac{3K}{8}\log ^2(2)-\frac{3\pi }{8}\zeta (3)\nonumber \\&-\frac{3}{4}\beta (4)-\frac{3}{2}\log (2)\,{\text {Im}}\,{\text {Li}}_3\left( \tfrac{1+i}{2}\right) -3\,{\text {Im}}\,{\text {Li}}_4(1-i) \end{aligned}$$
(26)

which provides closed forms for

$$\begin{aligned}&\sum _{n\ge 0}\frac{1}{(n+1)^5}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2,\quad \sum _{n\ge 0}\frac{1}{2^n(2n+1)^4}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] , \\&\sum _{n\ge 0}\frac{(-1)^n}{(2n+1)}\left( H_n^3-3 H_n H_{n}(2)+2H_{n}(3)\right) . \end{aligned}$$

On the other hand the class of hypergeometric functions of the \(\phantom {}_{p+1} F_p\left( \tfrac{1}{2},\tfrac{1}{2},\ldots ;\tfrac{3}{2},\tfrac{3}{2},\ldots ;x\right) \) kind is very peculiar, since all these functions have a closed form in terms of polylogarithms. As shown by Shalev and Reshetnikov in [16] we have

$$\begin{aligned} \phantom {}_4 F_3\left( \tfrac{1}{2},\tfrac{1}{2},\tfrac{1}{2},\tfrac{1}{2};\tfrac{3}{2},\tfrac{3}{2},\tfrac{3}{2};\sin ^2\theta \right) = \frac{\theta ^3}{6\sin \theta }+\frac{1}{2\sin \theta }\,{\text {Im}}\,{\text {Li}}_3\left( 2\sin ^2\theta +2i\sin \theta \cos \theta \right) \nonumber \\ \end{aligned}$$
(27)

for any \(\theta \in \left( 0,\frac{\pi }{2}\right) \), hence

$$\begin{aligned}&\phantom {}_5 F_4\left( \tfrac{1}{2},\tfrac{1}{2},\tfrac{1}{2},\tfrac{1}{2},\tfrac{1}{2};1,\tfrac{3}{2},\tfrac{3}{2},\tfrac{3}{2};1\right) = \sum _{n\ge 0}\frac{1}{(2n+1)^3}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 \\&\quad = \frac{2}{\pi }\int _{0}^{\pi /2}\frac{\theta ^3}{6\sin \theta }+\frac{1}{2\sin \theta }\,{\text {Im}}\,{\text {Li}}_3\left( 2\sin ^2\theta +2i\sin \theta \cos \theta \right) \,d\theta \\&\quad = \frac{\pi K}{2}-\frac{4}{\pi }\beta (4)+\frac{1}{\pi }\,{\text {Im}}\int _{0}^{\pi /2}{\text {Li}}_3\left( 2\sin ^2\theta +2i\sin \theta \cos \theta \right) \,\frac{d\theta }{\sin \theta }\\&\quad = \frac{\pi K}{2}-\frac{4}{\pi }\beta (4)+\frac{1}{\pi }\,{\text {Im}}\int _{0}^{+\infty }{\text {Li}}_3\left( \frac{2}{1-it}\right) \frac{dt}{\sqrt{t^2+1}}\,dt\\&\quad = \frac{\pi K}{2}-\frac{4}{\pi }\beta (4)+\frac{1}{\pi }\,\text {Re}\int _{1}^{2}\frac{{\text {Li}}_3(z)}{z\sqrt{z-1}}\,dz\\&\quad {\mathop {=}\limits ^{{\text {Li}}_3}} \frac{\pi K}{2}-\frac{4}{\pi }\beta (4)+\frac{2}{\pi }\int _{0}^{\pi /4}{\text {Li}}_3(\cos ^2\theta )+\frac{4}{3}\log ^3(\cos \theta )-\frac{2\pi ^2}{3}\log (\cos \theta )\,d\theta \end{aligned}$$

and the evaluation of \(\sum _{n\ge 0}\frac{(-1)^n {\mathscr {H}}_n^3}{(2n+1)}\) or \(\sum _{n\ge 0}\frac{(-1)^n {\mathscr {H}}_n^2}{(2n+1)^2}\) reduces to the computation of

$$\begin{aligned} \int _{0}^{1/2}\frac{{\text {Li}}_3(1-z)}{\sqrt{z(1-z)}}\,dz\quad \text {or}\quad \int _{1/2}^{1}\frac{{\text {Li}}_2(x)\arcsin (\sqrt{x})}{x}\,dx. \end{aligned}$$

By using Shalev’s form of (27) we have

$$\begin{aligned} \int _{0}^{1}\frac{\log ^2(x)}{\sqrt{x(1- x\sin ^2\theta )}}\,dx = \frac{8}{\sin \theta }\left[ \frac{\theta ^3}{3}-{\text {Im}}\,{\text {Li}}_3\left( 1-e^{2i\theta }\right) \right] \end{aligned}$$
(28)

hence by Fubini’s theorem

$$\begin{aligned} \sum _{n\ge 0}\frac{1}{(2n+1)^3}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2= & {} \frac{\pi K}{2}-\frac{4}{\pi }\beta (4)+\frac{2}{\pi }\,{\text {Im}}\int _{\gamma }\frac{{\text {Li}}_3(1-z^2)}{1-z^2}\,dz\nonumber \\= & {} \frac{\pi K}{2}-\frac{4}{\pi }\beta (4)+\frac{2}{\pi }\,{\text {Im}}\int _{z_0}^{i}\frac{{\text {Li}}_3(1-z^2)}{1-z^2}\,dz \end{aligned}$$
(29)

where \(\gamma \) is the positive-oriented curve \(\left\{ (\cos \theta ,\sin \theta ),\theta \in \left( 0,\frac{\pi }{2}\right) \right\} \) and \(z_0\) is any point \(\in (-1,1)\). By the generating function for Legendre polynomials and the previously computed \(\int _{0}^{1}\frac{\log ^2(x)}{\sqrt{x}}P_n(2x-1)\,dx\) we also have

$$\begin{aligned}&\forall \theta \in \left( 0,\tfrac{\pi }{2}\right) ,\qquad \frac{1}{4}\left[ \frac{\theta ^3}{3}-{\text {Im}}\,{\text {Li}}_3(1-e^{2i\theta })\right] =\sum _{n\ge 0}\left( \tan \tfrac{\theta }{2}\right) ^{2n+1}(-1)^n J_n, \\&\forall t\in (0,1),\qquad \frac{2}{3}\arctan ^3(t)-\frac{1}{4}{\text {Im}}\,{\text {Li}}_3\left( \frac{4it}{(i+t)^2}\right) =\sum _{n\ge 0}t^{2n+1} (-1)^n J_n, \\&J_n = \frac{2{\mathscr {H}}_n^2}{2n+1}-\frac{2{\mathscr {H}}_n}{(2n+1)^2}+\frac{1}{(2n+1)^3}. \end{aligned}$$

By the FL-expansion of \({\text {Li}}_3\), the computation of \(\sum _{n\ge 0}\frac{1}{(2n+1)^3}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2\) is equivalent to the computation of

$$\begin{aligned} \sum _{n\ge 1}\frac{(-1)^n \sum _{k=1}^{n}\frac{(-1)^k}{k^2}}{n(n+1)}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2, \end{aligned}$$

and by solving, through the inverse Laplace transform, the moment problem

$$\begin{aligned} \int _{0}^{1} x^n f(x)\,dx = (-1)^n \sum _{k=1}^{n}\frac{(-1)^k}{k^2} \end{aligned}$$

we get that the computation of the previous series is equivalent to the computation of the integral

$$\begin{aligned} \int _{0}^{1}\frac{\log x}{1+x}\sum _{n\ge 0}x^n\left( \frac{1}{n}-\frac{1}{n+1}\right) \left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2\,dx \end{aligned}$$

or the computation of the integrals \(\int _{0}^{1}K(x)\log (1+x)\,dx\) and \(\int _{0}^{1}K(x)\log (x)\log (1+x)\,dx\).

About other classical approaches, especially related to (weighted) sums of squares, an interesting consequence of the Lagrange identity

$$\begin{aligned} \left( \sum _{k=1}^{n}x_k^2\right) \left( \sum _{k=1}^{n}y_k^2\right) -\left( \sum _{k=1}^{n}x_k y_k\right) ^2 = \sum _{1\le j < k \le n}(x_j y_k - x_k y_j)^2 \end{aligned}$$

is the following one ( [13], Chapter 8, Section 35, Applications of the tranformation of series to numerical evaluations):

Lemma (Knopp). If \(\{a_n\}_{n\ge 0}\in \ell ^2({\mathbb {R}})\) is an eventually monotonic sequence, the following series are convergent

$$\begin{aligned} s:=\sum _{n=0}^\infty (-1)^na_n,\qquad \delta _k:=\sum _{n=0}^\infty a_na_{n+k}, \qquad \varDelta :=\sum _{k=1}^\infty (-1)^{k-1}\delta _k \end{aligned}$$

and we have:

$$\begin{aligned} \sum _{n\ge 0} a_n^2 = s^2+2\varDelta . \end{aligned}$$

Knopp’s lemma is tipically used for proving \(\zeta (2)=\frac{\pi ^2}{6}\) through elementary manipulations, once \(a_n\) has been defined as \(\frac{1}{n+1}\). On the other hand, it has interesting consequences for different hypergeometric sequences, too. Let us define \(a_n\) as

$$\begin{aligned} a_n := \frac{1}{1-2n}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] = [x^n]\sqrt{1-x}. \end{aligned}$$

For any \(k\in {\mathbb {N}}^+\) we have

$$\begin{aligned} \delta _k=\sum _{n\ge 0}a_n a_{n+k}= & {} \frac{1}{2\pi }\int _{0}^{2\pi } \sqrt{1-e^{i\theta }}\sqrt{1-e^{-i\theta }} e^{-ki\theta }\,d\theta \\= & {} \frac{1}{\pi }\int _{0}^{2\pi }\left| \sin \tfrac{\theta }{2}\right| \cos (k\theta )\,d\theta = \frac{4}{\pi (1-4k^2)} \end{aligned}$$

and \(s=\sqrt{2}\). By partial fraction decomposition we have \(\varDelta = \frac{2}{\pi }-1\), hence Knopp’s lemma immediately leads to an alternative proof of

$$\begin{aligned} \sum _{n\ge 0}\frac{1}{(2n-1)^2}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 = \phantom {}_2 F_1 \left( -\tfrac{1}{2},-\tfrac{1}{2};1;1\right) = \frac{4}{\pi }. \end{aligned}$$
(30)

In a similar fashion, if we define \(a_n\) as \(\frac{1}{n+1}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] =[x^n]\frac{2}{1+\sqrt{1-x}}\), we have

$$\begin{aligned} \delta _k = \sum _{n\ge 0}a_n a_{n+k} = \frac{4}{2k-1}\cdot \frac{1}{4^{k}}\left( {\begin{array}{c}2k\\ k\end{array}}\right) -\frac{16}{\pi (4k^2-1)} \end{aligned}$$

and \(s=2(\sqrt{2}-1)\), \(\varDelta =-8+4\sqrt{2}+\frac{8}{\pi }\), from which

$$\begin{aligned} \sum _{n\ge 0}\frac{1}{(n+1)^2}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 = \frac{16}{\pi }-4. \end{aligned}$$

The last identity can also be derived from (30) by reindexing, but of course the interesting part of this approach does not rely on the mere computations, but on the fact that it provides an alternative way for simplifying the structure of a hypergeometric series. On the other hand the class of hypergeometric terms \(a_n\) such that \(\delta _k\) has a reasonably concise form appears to be pretty narrow: we plan to perform a thorough analysis of the full potential of Knopp’s lemma in future works.

A third remark is about a symmetry trick. Campbell recently showed (in [6]) how to compute \(\sum _{n\ge 1}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 \frac{H_n}{2^n}\) (and similar series) from an integral transform, but a slightly different route proves that such series is clearly given by a combination of \(\pi \) and values of the logarithm and the complete elliptic integral of the first kind. Indeed, by directly exploiting the Maclaurin series of K(x) we have:

$$\begin{aligned}&\sum _{n\ge 1}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 \frac{H_n}{2^n} = \frac{2}{\pi }\int _{0}^{1}\frac{K(u/2)-K(1/2)}{u-1}\,du\\&\quad {\mathop {=}\limits ^{\text {Fubini}}} \frac{2}{\pi }\int _{0}^{\pi /2}\int _{0}^{1}\left( \frac{1}{\sqrt{1-\frac{u}{2}\sin ^2\theta }}-\frac{1}{\sqrt{1-\frac{1}{2}\sin ^2\theta }}\right) \frac{du}{u-1}\,d\theta \end{aligned}$$

and the evaluation of the RHS boils down to the evaluation of \(\int _{0}^{\pi }\frac{\log (3-\cos \varphi )}{\sqrt{3-\cos \varphi }}\,d\varphi \) or \(\int _{0}^{+\infty }\frac{\log (t)}{\sqrt{(t^2+1)(2t^2+1)}}\,dt\). On the other hand, if p(x) is a real, quadratic and palindromic polynomial, attaining positive values over \({\mathbb {R}}^+\), then \(\int _{0}^{+\infty }\frac{\log (x)}{p(x)}\,dx\) equals zero as a consequence of the substitution \(x\mapsto \frac{1}{x}\). By the very same reason, if q(x) is a real, biquadratic and palindromic polynomial, attaining positive values over \({\mathbb {R}}^+\), then \(\int _{0}^{+\infty }\frac{\log (x)}{\sqrt{q(x)}}\,dx = 0.\) In particular the rapidly convergent twisted hypergeometric series \(\sum _{n\ge 1}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2 \frac{H_n}{2^n}\) has a closed form in terms of \(\pi ,\log (2)\) and \(K\left( \frac{1}{2}\right) =\frac{1}{4\sqrt{\pi }}\varGamma \left( \frac{1}{4}\right) ^2\) only. Given the relation between \(K(\sqrt{k_1})\) and \(K(\sqrt{k_4})\), this principle allows us to state that

$$\begin{aligned} \sum _{n\ge 1}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2\frac{H_n}{(\sqrt{2}+1)^{4n}} \end{aligned}$$

has a closed form in terms of \(\sqrt{2},\pi ,\log (2),\log (1+\sqrt{2})\) and the lemniscate constant without actually performing any computation. The same applies to

$$\begin{aligned} \sum _{n\ge 1}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2\frac{H_n}{(n+1)2^n}, \end{aligned}$$

which depends on \(\pi ,\log (2),\varGamma \left( \frac{1}{4}\right) \) and its reciprocal, since \(K\left( \frac{1}{2}\right) \) and \(E\left( \frac{1}{2}\right) \) are related via Legendre’s identity. Analogously, a closed form of

$$\begin{aligned} \sum _{n\ge 1}\left[ \frac{1}{4^n}\left( {\begin{array}{c}2n\\ n\end{array}}\right) \right] ^2\frac{H_n}{(n+1)(\sqrt{2}+1)^{4n}} \end{aligned}$$

only depends on \(\pi ,\log (2),\log (\sqrt{2}+1),\varGamma \left( \frac{1}{4}\right) \) and its reciprocal. This leaves us with an interesting topic for future investigations, partially covered by the first section and the last paragraph:

Is it possible to foresee, through symmetry tricks and/or

reflection/transformation formulas for hypergeometric functions

and polylogarithms, the constants involved in the closed form for a (twisted) hypergeometric series?

The last remark is about the operator

$$\begin{aligned} {\mathscr {C}}{\mathscr {D}}: f(x)\mapsto \frac{1}{x}\cdot {\mathcal {L}}^{-1}\left( (2n+1)\int _{0}^{1}f(x)P_n(2x-1)\,dx\right) (-\log x) \end{aligned}$$

defined on the space of functions in \(L^2(0,1)\), such that the FL-expansion has an inverse Laplace transform. This operator is self-adjoint by construction, and the complexity of \({\mathscr {C}}{\mathscr {D}}(f)\) measures the effectiveness of the FL-method in providing a closed form to \(\int _{0}^{1}f(x)g(x)\,dx\). Of course if \(f\in L^2(0,1)\) is such that \(f(x)=f(1-x)\), all the coefficients of the FL-expansion of f(x) with odd index are zero, hence it is practical to introduce the similar operator

$$\begin{aligned} {\mathscr {C}}{\mathscr {D}}_0: f(x)\mapsto \frac{1}{x}\cdot {\mathcal {L}}^{-1}\left( (4n+1)\int _{0}^{1}f(x)P_{2n}(2x-1)\,dx\right) (-\log x) \end{aligned}$$

only acting on the coefficients of the FL-expansion with an even index. We introduce a compendium of some functions we have dealt with through this article, together with their \({\mathscr {C}}{\mathscr {D}}\) or \({\mathscr {C}}{\mathscr {D}}_0\)-transforms:

f(x)

\(({\mathscr {C}}{\mathscr {D}} f)(x)\) or \(({\mathscr {C}}{\mathscr {D}}_0 f)(x)\)

\(\sqrt{1-x}\)

\(\frac{1}{4}\left( \sqrt{x}-\frac{1}{x\sqrt{x}}\right) \)

K(x)

\(\frac{1}{\sqrt{x}}\)

E(x)

\(\frac{1}{4}\left( -\frac{1}{x\sqrt{x}}+\frac{2}{\sqrt{x}}-\sqrt{x}\right) \)

\(-\log (1-x)\)

\(1+\frac{1}{x}\)

\(\log ^2(1+\frac{1}{\sqrt{1-x}})\)

1

\(\log (x)\log (1-x)\)

\(\log \left( x\right) \frac{1-\sqrt{x}}{2x}\)

\({\text {Li}}_2(x)\)

\(\left( 1-\frac{1}{x}\right) \log (x)\)

4 Conclusions

Continuing from our previous work, we performed a deeper investigation about the relations between (twisted) hypergeometric sums and Euler sums/polylogarithms. The geometry of hypergeometric series with half-integer or quarter-integer parameters, from the contiguity relations to the Gauss-Kummer transformations, turns out to be heavily related to the geometry of Euler sums and the arrangements of hyperplanes (the shuffle relations mentioned by Flajolet and Salvy in [11] are just birational maps of hypercubes into themselves). The accumulated evidence brings us to state that in many practical cases the FL machinery is extremely effective in simplifying the structure of a (twisted) hypergeometric series, especially if combined with the computation of residues for suitable kernels involving \(\psi (z)=\frac{d}{dz}\log \varGamma (z)\), or with differentiation of combinatorial/hypergeometric identities (Gauss, Chu-Vandermonde, Dougall-Dixon). We reduced a large number of \(\phantom {}_{p+1} F_{p}(\ldots ;\pm 1)\) (and twisted) values to standard mathematical constants, out-performing the capabilities of many computer algebra systems. In a forthcoming future, it might be the case to devise a fully automated conversion procedure for \(\phantom {}_{p+1} F_{p}(\ldots ;\pm 1)\) values, driven by FL-expansions and Euler sums, to be coupled with the classical Wilf-Zeilberger method ([12, 25]). That would largely increase the potential of computer algebra systems in the symbolic evaluation of hypergeometric series and twisted hypergeometric series.