# A group of important generating functions involving harmonic number.

How to prove the following identities:

$$\small{\sum_{n=1}^\infty\frac{H_{n}}{n^2}x^{n}=\operatorname{Li}_3(x)-\operatorname{Li}_3(1-x)+\ln(1-x)\operatorname{Li}_2(1-x)+\frac12\ln x\ln^2(1-x)+\zeta(3)}\tag1$$

$$\small{\sum_{n=1}^\infty\frac{H_{n}^{(2)}}{n}x^{n}=\operatorname{Li}_3(x)+2\operatorname{Li}_3(1-x)-\ln(1-x)\operatorname{Li}_2(1-x)-\zeta(2)\ln(1-x)-2\zeta(3)}\tag2$$

$$\sum_{n=1}^\infty (H_n^2-H_n^{(2)})x^{n}=\frac{\ln^2(1-x)}{1-x}\tag3$$

$$\sum_{n=1}^\infty\frac{H_{n}^2}{n}x^{n}=\operatorname{Li}_3(x)-\ln(1-x)\operatorname{Li}_2(x)-\frac13\ln^3(1-x)\tag4$$

$$\small{\sum_{n=1}^\infty H_n^3x^n= \frac{\operatorname{Li}_3(x)+3\operatorname{Li}_3(1-x)+\frac32\ln x\ln^2(1-x)-3\zeta(2)\ln(1-x)-\ln^3(1-x)-3\zeta(3)}{1-x}}\tag5$$

$$\small{\sum_{n=1}^\infty H_nH_n^{(2)}x^n= \frac{\operatorname{Li}_3(x)+\operatorname{Li}_3(1-x)+\frac12\ln x\ln^2(1-x)-\zeta(2)\ln(1-x)-\zeta(3)}{1-x}}\tag6$$

$$\sum_{n=1}^\infty\left(H_n^3-3H_nH_n^{(2)}+2H_n^{(3)}\right)x^n=-\frac{\ln^3(1-x)}{1-x}\tag7$$

Edit:

Here is some extra identities and proofs in the answer sections

$$\sum_{n=1}^\infty \frac{H_n^{(3)}}{n}x^n=\operatorname{Li}_4(x)-\ln(1-x)\operatorname{Li}_3(x)-\frac12\operatorname{Li}_2^2(x)\tag8$$

$$\sum_{n=1}^\infty\frac{ H_n^{(2)}}{n+1}x^{n}=\frac{2\operatorname{Li}_3(1-x)-\operatorname{Li}_2(1-x)\ln(1-x)-\zeta(2)\ln(1-x)-2\zeta(3)}{x}\tag{9}$$

$$\small{\sum_{n=1}^\infty\frac{ H_n^{2}}{n+1}x^{n}=\frac{6\operatorname{Li}_3(1-x)-3\operatorname{Li}_2(1-x)\ln(1-x)-\ln^3(1-x)-3\zeta(2)\ln(1-x)-6\zeta(3)}{3x}}\tag{10}$$

Note:

Proofs for (3) and (7) should be done without using the formula of the sterling number of the first kind : $$\frac{\ln^k(1+x)}{k!}=\sum_{n=k}^\infty(-1)^{n-k} \begin{bmatrix} n \\ k \end{bmatrix}\frac{x^n}{n!}$$.

• I'm voting to close this question as off-topic because this is not a question, but instead some kind of reference in our (???) solutions? – Markus Scheuer Sep 23 '19 at 22:24
• @MarkusScheuer how have you been on MSE so long and still not get that self-answers are allowed on stack exchange – qwr Dec 28 '19 at 8:16
• @qwr: You miss the point. The initial version of this post was not formulated as question. – Markus Scheuer Dec 28 '19 at 8:36
• @qwr you can see what I edited .. it was not that different. I had to edite it to avoid the down voters. – Ali Shather Dec 28 '19 at 8:41
• @Ali Shather +1 for the very useful collection of formulas (and their proofs). There should be more of these overviews. Comment: I confess that I am not particularly happy with the "red tape" requirement that anything - even nice results which we like to share with others - has to be formulated as a question. But the remedy is simple, as you have shown in several occasions: just start the heading with the prefix "How to prove". What an exciting improvement! – Dr. Wolfgang Hintze Apr 1 at 8:42

## 5 Answers

Using the fact that

$$\sum_{n=1}^\infty H_nx^n=-\frac{\ln(1-x)}{1-x}$$

Divide both sides by $$x$$ then integrate we have

\begin{align} \sum_{n=1}^\infty\frac{H_n}{n}x^n&=-\int\frac{\ln(1-x)}{x(1-x)}\ dx\\ &=-\int\frac{\ln(1-x)}{x}\ dx-\int\frac{\ln(1-x)}{1-x}\ dx\\ &=\operatorname{Li}_2(x)+\frac12\ln^2(1-x)+C,\quad x=0\Rightarrow C=0 \end{align}

Then

$$\sum_{n=1}^\infty\frac{H_n}{n}x^n=\operatorname{Li}_2(x)+\frac12\ln^2(1-x)\tag i$$

Proof of (1):

Divide both sides of (i) by $$x$$ then integrate

\begin{align} \sum_{n=1}^\infty\frac{H_n}{n^2}x^n&=\operatorname{Li}_3(x)+\frac12\underbrace{\int\frac{\ln^2(1-x)}{x}\ dx}_{IBP}\\ &=\operatorname{Li}_3(x)+\frac12\ln x\ln^2(1-x)+\underbrace{\int\frac{\ln x\ln(1-x)}{1-x}\ dx}_{IBP}\\ &=\operatorname{Li}_3(x)+\frac12\ln x\ln^2(1-x)+\operatorname{Li}_2(1-x)\ln(1-x)+\int\frac{\operatorname{Li}_2(1-x)}{1-x}\ dx\\ &=\small{\operatorname{Li}_3(x)+\frac12\ln x\ln^2(1-x)+\operatorname{Li}_2(1-x)\ln(1-x)-\operatorname{Li}_3(1-x)+C,\quad x=0\Rightarrow C=\zeta(3)} \end{align}

Then

$$\small{\sum_{n=1}^\infty\frac{H_n}{n^2}x^n=\operatorname{Li}_2(x)-\operatorname{Li}_3(1-x)+\ln(1-x)\operatorname{Li}_2(1-x)+\frac12\ln x\ln^2(1-x)+\zeta(3)}\tag{ii}$$

Proof of (2):

By Cauchy product we have

$$-\ln(1-x)\operatorname{Li}_2(x)=2\sum_{n=1}^\infty\frac{H_n}{n^2}x^n+\sum_{n=1}^\infty\frac{H_n^{(2)}}{n}x^n-3\operatorname{Li}_3(x)\tag{iii}$$

From (ii) and (iii) we get

$$\small{\sum_{n=1}^\infty\frac{H_{n}^{(2)}}{n}x^{n}=\operatorname{Li}_3(x)+2\operatorname{Li}_3(1-x)-\ln(1-x)\operatorname{Li}_2(1-x)-\zeta(2)\ln(1-x)-2\zeta(3)}\tag{iv}$$

where I substituted, using the Dilogarithm reflection formula

$$\operatorname{Li}_2(x)=\zeta(2)-\ln x\ln(1-x)-\operatorname{Li}_2(1-x)$$

Proof of (3):

Using the generalization: (proved at the bottom)

$$\sum_{n=1}^\infty a_nx^n=\frac1{1-x}\sum_{n=1}^\infty (a_n-a_{n-1})x^n,\quad a_{0}=0\tag{v}$$

Let $$a_{n}=H_n^2$$ in (v) to have

\begin{align} \sum_{n=1}^\infty H_n^2x^n&=\frac1{1-x}\sum_{n=1}^\infty \left(H_n^2-H_{n-1}^2\right)x^n\\ &=\frac1{1-x}\sum_{n=1}^\infty \left(\frac{2H_n}{n}-\frac1{n^2}\right)x^n\\ &=\frac1{1-x}\cdot 2\sum_{n=1}^\infty\frac{H_n}{n}x^n-\frac{\operatorname{Li}_2(x)}{1-x}\\ &=\frac1{1-x}\cdot 2\left(\operatorname{Li}_2(x)+\frac12\ln^2(1-x)\right)-\frac{\operatorname{Li}_2(x)}{1-x}\\ &=\frac{\ln^2(1-x)}{1-x}+\frac{\operatorname{Li}_2(x)}{1-x}\\ &=\frac{\ln^2(1-x)}{1-x}+\sum_{n=1}^\infty H_n^{(2)}x^n \end{align}

Then

$$\sum_{n=1}^\infty (H_n^2-H_n^{(2)})x^{n}=\frac{\ln^2(1-x)}{1-x}\tag{vi}$$

Proof of (4):

Divide both sides of (vi) by $$x$$ then integrate we have

\begin{align} \sum_{n=1}^\infty (H_n^2-H_n^{(2)})\frac{x^{n}}{n}&=\int\frac{\ln^2(1-x)}{x(1-x)}\ dx\\ &=\int\frac{\ln^2(1-x)}{x}\ dx+\int\frac{\ln^2(1-x)}{1-x}\ dx \end{align}

the first integral is calculated in proof of (1) and its equal to

$$\ln x\ln^2(1-x)+2\ln(1-x)\operatorname{Li}_2(1-x)-2\operatorname{Li}_3(1-x)$$

then

$$\small{\sum_{n=1}^\infty (H_n^2-H_n^{(2)})\frac{x^{n}}{n}=\ln x\ln^2(1-x)+2\ln(1-x)\operatorname{Li}_2(1-x)-2\operatorname{Li}_3(1-x)-\frac13\ln^3(1-x)+C}$$

if we set $$x=0$$ we get $$C=2\zeta(3)$$

$$\small{\sum_{n=1}^\infty (H_n^2-H_n^{(2)})\frac{x^{n}}{n}=\ln x\ln^2(1-x)+2\ln(1-x)\operatorname{Li}_2(1-x)-2\operatorname{Li}_3(1-x)-\frac13\ln^3(1-x)+2\zeta(3)}\quad \text{(vii)}$$

from (iv) and (vii) we get

$$\sum_{n=1}^\infty\frac{H_{n}^2}{n}x^{n}=\operatorname{Li}_3(x)-\ln(1-x)\operatorname{Li}_2(x)-\frac13\ln^3(1-x)\tag{viii}$$

Proof of (5):

Let $$a_n=H_n^3$$ in (v) we get

\begin{align} \sum_{n=1}^\infty H_n^3x^n&=\frac1{1-x}\sum_{n=1}^\infty (H_n^3-H_{n-1}^3)x^n\\ &=\frac1{1-x}\sum_{n=1}^\infty\left(\frac{3H_n^2}{n}-\frac{3H_n}{n^2}+\frac1{n^3}\right)x^n\\ &=\frac1{1-x}\cdot 3\sum_{n=1}^\infty\frac{H_n^2}{n}x^n-\frac1{1-x}\cdot 3\sum_{n=1}^\infty\frac{H_n}{n^2}x^n+\frac{\operatorname{Li}_3(x)}{1-x} \end{align}

Combine the results from (ii) and (viii) we get

$$\small{\sum_{n=1}^\infty H_n^3x^n= \frac{\operatorname{Li}_3(x)+3\operatorname{Li}_3(1-x)+\frac32\ln x\ln^2(1-x)-3\zeta(2)\ln(1-x)-\ln^3(1-x)-3\zeta(3)}{1-x}}\tag{ix}$$

Proof of (6):

Let $$a_n=H_nH_n^{(2)}$$ in (v) we get

\begin{align} \sum_{n=1}^\infty H_nH_n^{(2)}x^n&=\frac1{1-x}\sum_{n=1}^\infty \left(H_nH_n^{(2)}-H_{n-1}H_{n-1}^{(2)}\right)x^n\\ &=\frac1{1-x}\sum_{n=1}^\infty\left(\frac{H_n}{n^2}+\frac{H_n^{(2)}}{n}-\frac1{n^3}\right)x^n\\ &=\frac1{1-x}\sum_{n=1}^\infty\frac{H_n}{n^2}x^n+\frac1{1-x}\sum_{n=1}^\infty\frac{H_n^{(2)}}{n}x^n-\frac{\operatorname{Li}_3(x)}{1-x} \end{align}

Substituting the results from (ii) and (iv) we get

$$\small{\sum_{n=1}^\infty H_nH_n^{(2)}x^n= \frac{\operatorname{Li}_3(x)+\operatorname{Li}_3(1-x)+\frac12\ln x\ln^2(1-x)-\zeta(2)\ln(1-x)-\zeta(3)}{1-x}}\tag{x}$$

Proof of (7):

Combine the results from (ix) and (x) along with $$\sum_{n=1}^\infty H_n^{(3)}x^n=\frac{\operatorname{Li}_3(x)}{1-x}$$ we get

$$\sum_{n=1}^\infty\left(H_n^3-3H_nH_n^{(2)}+2H_n^{(3)}\right)x^n=-\frac{\ln^3(1-x)}{1-x}$$

Different approach to prove (7):

again by using the generalization

$$\sum_{n=1}^\infty a_nx^n=\frac1{1-x}\sum_{n=1}^\infty (a_n-a_{n-1})x^n,\quad a_{0}=0$$

and setting $$a_n=H_n^3-3H_nH_n^{(2)}+2H_n^{(3)}$$ we have

$$\sum_{n=1}^\infty \left(H_n^3-3H_nH_n^{(2)}+2H_n^{(3)}\right)x^n\\=\frac1{1-x}\sum_{n=1}^\infty\left(H_n^3-3H_nH_n^{(2)}+2H_n^{(3)}-H_{n-1}^3+3H_{n-1}H_{n-1}^{(2)}-2H_{n-1}^{(3)}\right)\\ =\frac1{1-x}\sum_{n=1}^\infty\left[3\left(\frac{H_n^2-H_n^{(2)}}{n}\right)-6\frac{H_n^{(2)}}{n}+\frac6{n^3}\right]x^n\\ =\frac1{1-x}\cdot3\sum_{n=1}^\infty\left(H_n^2-H_n^{(2)}\right)\frac{x^n}{n}-\frac1{1-x}\cdot 6\sum_{n=1}^\infty\frac{H_n}{n^2}x^n+\frac{6\operatorname{Li}_3(x)}{1-x}$$

Combine the results from (ii) and (vii) we get

$$\sum_{n=1}^\infty\left(H_n^3-3H_nH_n^{(2)}+2H_n^{(3)}\right)x^n=-\frac{\ln^3(1-x)}{1-x}$$

Proof of the generalization:

\begin{align} \color{blue}{1}\sum_{n=0}^\infty a_nx^n&=\left(\color{blue}{\frac1{1-x}-\frac{x}{1-x}}\right)\sum_{n=0}^\infty a_nx^n\\ &=\frac1{1-x}\sum_{n=0}^\infty a_nx^n-\frac1{1-x}\sum_{n=0}^\infty a_nx^{n+1}\\ &=\frac1{1-x}\sum_{n=0}^\infty a_nx^n-\frac1{1-x}\sum_{n=1}^\infty a_{n-1}x^{n},\quad \text{assuming}\ \color{red}{a_{0}=0}\\ \sum_{n=\color{red}{1}}^\infty a_nx^n&=\frac1{1-x}\sum_{n=\color{red}{1}}^\infty a_nx^n-\frac1{1-x}\sum_{n=1}^\infty a_{n-1}x^{n} \end{align}

Then

$$\sum_{n=1}^\infty a_nx^n=\frac1{1-x}\sum_{n=1}^\infty (a_n-a_{n-1})x^n,\quad a_{0}=0$$

All the generating functions may be found in the book, (Almost) Impossible Integrals, Sums, and Series.

The versions $$\displaystyle \sum_{n=1}^{\infty} x^{n+1} \frac{H_n}{(n+1)^2}$$ and $$\displaystyle \sum_{n=1}^{\infty} x^{n+1} \frac{H_n^{(2)}}{n+1}$$ may be found calculated in $$(6.18)$$ and $$(6.19)$$, page $$351$$ from which we extract $$(1)$$ and $$(2)$$ in the post statement by simply readjusting.

The results in $$(3)$$ and $$(7)$$ in the post statement may be found on page $$355$$, and a generalization of $$\displaystyle \frac{\log^n(1-x)}{1-x}$$ expressed with the help of symmetric polynomials may be found on pages $$354$$-$$355$$. Also, $$(3)$$ in the post statement may be obtained by combining the generating functions in $$(4.6)$$ and $$(4.7)$$.

The result in $$(4)$$ in the post statement may be extracted by using the result in $$(4.7)$$, page $$284$$.

Also, the results in $$(5)$$ and $$(6)$$ are found on page $$284$$.

Proof of $$(8)$$:

From integrating the generating function after dividing by $$x$$

$$\sum_{n=1}^\infty H_n^{(3)}x^n=\frac{\operatorname{Li}_3(x)}{1-x}$$

it follows that

$$\sum_{n=1}^\infty \frac{H_n^{(3)}}{n}x^n=\int\frac{\operatorname{Li}_3(x)}{x(1-x)}dx=\int\frac{\operatorname{Li}_3(x)}{x}dx+\int\frac{\operatorname{Li}_3(x)}{1-x}dx$$

$$=\operatorname{Li}_4(x)-\ln(1-x)\operatorname{Li}_3(x)+\int\frac{\ln(1-x)\operatorname{Li}_2(x)}{x}dx$$

$$=\operatorname{Li}_4(x)-\ln(1-x)\operatorname{Li}_3(x)-\frac12\operatorname{Li}_2^2(x)+C$$

Set $$x=0\Longrightarrow C=0$$

then

$$\sum_{n=1}^\infty \frac{H_n^{(3)}}{n}x^n=\operatorname{Li}_4(x)-\ln(1-x)\operatorname{Li}_3(x)-\frac12\operatorname{Li}_2^2(x)$$

Proof of $$(9)$$ and $$(10)$$:

We proved above

$$\sum_{n=1}^\infty (H_n^2-H_n^{(2)})x^{n}=\frac{\ln^2(1-x)}{1-x}$$

Integrating both sides gives

$$\sum_{n=1}^\infty \frac{H_n^2-H_n^{(2)}}{n+1}x^{n+1}=\int\frac{\ln^2(1-x)}{1-x}dx=-\frac13\ln^3(1-x)+C$$

where $$C=0$$ if we set $$x=0$$

Then

$$\sum_{n=1}^\infty \frac{H_n^2}{n+1}x^{n+1}=\sum_{n=1}^\infty \frac{H_n^{(2)}}{n+1}x^{n+1}-\frac13\ln^3(1-x)\tag1$$

From

$$\sum_{n=1}^\infty H_n^{(2)}x^n=\frac{\operatorname{Li}_2(x)}{1-x}$$

It follows that

$$\sum_{n=1}^\infty\frac{ H_n^{(2)}}{n+1}x^{n+1}=\int \frac{\operatorname{Li}_2(x)}{1-x}dx=f(x)\tag2$$

now let $$1-x=y$$ then use the reflection formula $$\operatorname{Li}_2(1-y)=\zeta(2)-\ln(y)\ln(1-y)-\operatorname{Li}_2(y)$$

$$f(x)=-\zeta(2)\int\frac{dy}{y}+\int\frac{\ln(y)\ln(1-y)}{y}dy+\int\frac{\operatorname{Li}_2(y)}{y}dx\\=-\zeta(2)\ln(y)+\left[-\operatorname{Li}_2(y)\ln(y)+\int\frac{\operatorname{Li}_2(y)}{y}dy\right]+\operatorname{Li}_3(y)\\=2\operatorname{Li}_3(y)-\operatorname{Li}_2(y)\ln(y)-\zeta(2)\ln(y)\\=2\operatorname{Li}_3(1-x)-\operatorname{Li}_2(1-x)\ln(1-x)-\zeta(2)\ln(1-x)+C$$

Set $$x=0$$ $$\Longrightarrow C=-2\zeta(3)$$

Then

$$f(x)=2\operatorname{Li}_3(1-x)-\operatorname{Li}_2(1-x)\ln(1-x)-\zeta(2)\ln(1-x)-2\zeta(3)\tag3$$

Plugging $$(3)$$ in $$(2)$$ yields

$$\sum_{n=1}^\infty\frac{ H_n^{(2)}}{n+1}x^{n+1}=2\operatorname{Li}_3(1-x)-\operatorname{Li}_2(1-x)\ln(1-x)-\zeta(2)\ln(1-x)-2\zeta(3)\tag4$$

Finally plug $$(4)$$ in $$(1)$$ we get

$$\small{\sum_{n=1}^\infty\frac{ H_n^{2}}{n+1}x^{n+1}=2\operatorname{Li}_3(1-x)-\operatorname{Li}_2(1-x)\ln(1-x)-\frac13\ln^3(1-x)-\zeta(2)\ln(1-x)-2\zeta(3)}$$

Or

$$\small{\sum_{n=1}^\infty\frac{ H_n^{2}}{n+1}x^{n}=\frac{6\operatorname{Li}_3(1-x)-3\operatorname{Li}_2(1-x)\ln(1-x)-\ln^3(1-x)-3\zeta(2)\ln(1-x)-6\zeta(3)}{3x}}$$

Different way to prove

$$\sum_{n=1}^\infty (H_n^2-H_n^{(2)})x^{n}=\frac{\ln^2(1-x)}{1-x}$$

Using the proved-above identity

$$\sum_{n=1}^\infty a_nx^n=\frac1{1-x}\sum_{n=1}^\infty (a_n-a_{n-1})x^n,\quad a_{0}=0$$

Set $$a_n=H_n^2-H_n^{(2)}$$

we get

$$\sum_{n=1}^\infty (H_n^2-H_n^{(2)})x^{n}=\frac1{1-x}\sum_{n=1}^\infty (H_n^2-H_n^{(2)}-H_{n-1}^2+H_{n-1}^{(2)})x^{n}$$ $$=\frac{1}{1-x}\sum_{n=1}^\infty\left(\frac{2H_n}{n}-\frac{2}{n^2}\right)x^n=\frac{2}{1-x}\left(\color{blue}{\sum_{n=1}^\infty\frac{H_n}{n}x^n-\operatorname{Li}_2(x)}\right)$$

$$=\frac{2}{1-x}\left(\color{blue}{\frac12\ln^2(1-x)}\right)=\frac{\ln^2(1-x)}{1-x}$$

where the blue result follows from dividing both sides of $$\sum_{n=1}^\infty H_nx^n=-\frac{\ln(1-x)}{1-x}$$ by $$x$$ then integrating from $$x=0$$ to $$x=x$$

$$\sum_{n=1}^\infty \frac{H_n}{n}x^n=-\int_0^x\frac{\ln(1-x)}{x(1-x)}\ dx=\operatorname{Li}_2(x)+\frac12\ln^2(1-x)$$

or $$\sum_{n=1}^\infty\frac{H_n}{n}x^n-\operatorname{Li}_2(x)=\frac12\ln^2(1-x)$$