Keywords

1 New Definition of the Generalized Harmonic Numbers

1.1 The Weyl Integral

One of the possible definition of the fractional derivative is based on the Weyl integral (see [6]) given by formula

$$\begin{aligned} W^{-\alpha } f(x) = \frac{1}{\varGamma (\alpha )} \int _x^\infty (\xi - x)^{\alpha -1} f(\xi ) \mathrm {d}\xi , \ \alpha>0, \ x>0. \end{aligned}$$
(2)

Moreover we take \(W^0 f(x) := f(x)\). If \(f(x) = O(x^{-\beta })\) as \(x\rightarrow \infty \), then the integral is convergent for \(0< \alpha < \beta \).

Let us present now some properties of the Weyl integral. Assuming the existence of the appropriate integrals, the following equalities hold

$$\begin{aligned} W^{-\alpha }\left( W^{-\beta } f(x) \right)&= W^{-\beta } \left( W^{-\alpha } f(x) \right) , \ \alpha ,\beta>0,\\ \frac{d^n}{dx^n} \left( W^{-\alpha } f(x) \right)&= W^{-\alpha } \left( \frac{d^n f(x)}{dx} \right) , \ \alpha>0,\ n\in \mathbb {N}, \\ E^{n} \left( W^{-\alpha } f(x) \right)&= W^{-\alpha }(E^n f(x)), \ \alpha >0, \ n \in \mathbb {N}, \end{aligned}$$

where \(E f(x) := -\frac{d f(x)}{dx}\).

Definition 1

Let f be a function being integrable in any compact interval \(I \subset [0,\infty )\) and let \(f(x) = O(x^{-\beta })\) as \(x\rightarrow \infty ,\) for some \(\beta > 0\). Then for each \(\alpha > -\beta \) there exists the Weyl fractional derivative of function f(x) of order \(\alpha \) and

$$\begin{aligned} dW^{\alpha } f(x) = {\left\{ \begin{array}{ll} W^{\alpha }f(x), &{} \alpha <0,\\ f(x), &{} \alpha =0,\\ W^{\alpha - \lceil \alpha \rceil } \left( E^{\lceil \alpha \rceil } f(x) \right) , &{} \alpha >0. \end{array}\right. } \end{aligned}$$
(3)

Example 1

We determine the Weyl fractional derivative of function \(e^{-px}\), \(p>0\):

$$\begin{aligned}&W^{-\alpha } e^{-px} = \frac{1}{\varGamma (\alpha )} \int _x^\infty (\xi - x)^{\alpha -1} e^{-p \xi } \mathrm {d}\xi = \left[ \begin{array}{c} \xi -x =u\\ d\xi = du \end{array}\right] \\&=\frac{1}{\varGamma (\alpha )} e^{-px}\int _0^\infty u^{\alpha -1}e^{-pu} \mathrm {d}u = p^{-\alpha }e^{-px} \end{aligned}$$

for \(\alpha >0\), \(p>0\). Hence we obtain

$$\begin{aligned} dW^{\alpha } e^{-px} = W^{\alpha - \lceil \alpha \rceil } \left( E^{\lceil \alpha \rceil } e^{-px} \right) = W^{\alpha - \lceil \alpha \rceil }\left( p^{\lceil \alpha \rceil } e^{-px} \right) =p^{\alpha }e^{-px} \end{aligned}$$

for \(\alpha >0\).

Example 2

Now, we derive the Weyl fractional derivative of function \(\frac{1}{x^p}\), \(p>0\):

$$\begin{aligned}&W^{-\alpha } \left( \frac{1}{x^p} \right) = \frac{1}{\varGamma (\alpha )} \int _x^\infty \frac{(\xi -x)^{\alpha -1} }{\xi ^p} \mathrm {d}\xi = \frac{1}{\varGamma (\alpha )} \int _x^\infty \frac{(1-\frac{x}{\xi })^{\alpha -1}}{\xi ^{p-\alpha +1 }} \mathrm {d}\xi \nonumber \\&= \left[ \begin{array}{c} \frac{x}{\xi } = u\\ \frac{x}{\xi ^2}d\xi = -du \end{array}\right] = \frac{1}{\varGamma (\alpha )} \cdot \frac{1}{x^{p-\alpha }} \int _0^1 (1-u)^{\alpha -1} u^{p-\alpha -1} \mathrm {d}u \\&=\frac{B(\alpha ,p-\alpha )}{\varGamma (\alpha )}\cdot \frac{1}{x^{p-\alpha } } = \frac{\varGamma (p-\alpha )}{\varGamma (p)} \cdot \frac{1}{x^{p-\alpha } }\nonumber \end{aligned}$$
(4)

for \(p>\alpha >0\), where B(xy) denotes the beta function. Thus we get

$$\begin{aligned}&dW^{\alpha } \left( \frac{1}{x^p} \right) = W^{\alpha - \lceil \alpha \rceil }\left( E^{\lceil \alpha \rceil } \left( \frac{1}{x^p}\right) \right) \\&= W^{\alpha - \lceil \alpha \rceil } \left( \frac{\varGamma (p+ \lceil \alpha \rceil )}{\varGamma (p)} \cdot \frac{1}{x^{p+ \lceil \alpha \rceil } } \right) = \frac{\varGamma (p+\alpha )}{\varGamma (p)} \cdot \frac{1}{x^{p+\alpha } } \end{aligned}$$

for \(\alpha >0\), \(p>0\).

1.2 Poligamma Functions and Their Modifications

Definition 2

The poligamma function of order m is defined as follows

$$\begin{aligned} \psi ^{(0)}(x):=\psi (x)=\frac{d}{dx} \ln \Gamma (x), \qquad \psi ^{(m)}(x):= \frac{d^m}{dx^m} \psi (x), \qquad m \in \mathbb {N}. \end{aligned}$$

This function satisfies the recurrence relation (the basic facts concerning the \(\psi \) function, including formulas (5)–(7) are presented in monograph [7]):

$$\begin{aligned} \psi ^{(m)}(x+1)=\psi ^{(m)}(x)+\frac{(-1)^m m!}{x^{m+1}} \end{aligned}$$
(5)

and from this relation we can get the equality (1). The poligamma function possesses also the integral representation

$$\begin{aligned} \psi (x)=\int \limits _0^\infty \left( \frac{e^{-t}}{t}-\frac{e^{xt}}{1-e^{-t}} \right) \mathrm {d}t, \quad \psi ^{(m)}(x)=(-1)^{m+1} \int \limits _0^\infty \frac{t^me^{-xt}}{1-e^{-t}} \mathrm {d}t, \, x>0, \end{aligned}$$
(6)

and can be presented in the form of series

$$\begin{aligned} \psi (x+1)=-\gamma +\sum _{n=1}^\infty \frac{x}{n(n + x)}, \qquad \psi ^{(m)}(x)= (-1)^{m+1}m! \sum _{n=0}^\infty \frac{1}{(x+n)^{m+1}}. \end{aligned}$$
(7)

Let us define now the modified poligamma functions

$$\begin{aligned} \psi _*^{(0)}(x):=\psi (x), \quad \psi _*^{(\alpha )}(x):=dW^\alpha \left( \psi (x)\right) , \quad \alpha >0. \end{aligned}$$
(8)

Remark 1

The Weyl integral of function \(\psi (x)\) is divergent, whereas for any \(\alpha \in (0, 1)\), \(m \in \mathbb {N}\) the integral \(W^{-\alpha }\left( \psi ^{(m)}(x)\right) \) is convergent, thereby the function

$$\psi _*^{(\beta )}(x)=dW^\beta \left( \psi (x)\right) =W^{\beta -\lceil \beta \rceil } \left( E^{\lceil \beta \rceil } \psi (x)\right) =(-1)^{\lceil \beta \rceil } W^{\beta -\lceil \beta \rceil } \left( \psi ^{(\lceil \beta \rceil )} (x)\right) $$

is correctly defined for every \(\beta >0\).

By using definitions (8), (3), (2) and formula (4) we can derive the following recurrence relation (which is a generalization of formula (5)):

$$\begin{aligned} \begin{aligned}&\psi _*^{(\alpha )}(x + 1)=dW^\alpha \left( \psi (x + 1)\right) =dW^\alpha \left( \psi (x)+\frac{1}{x}\right) \\&=dW^\alpha \left( \psi (x)\right) +dW^\alpha \left( \frac{1}{x}\right) =\psi _*^{(\alpha )} (x)+\frac{\Gamma (\alpha +1)}{x^{\alpha +1}}. \end{aligned} \end{aligned}$$
(9)

Some Representations of the \(\varvec{\psi _* ^{(\alpha )}}\) Function

First we present the integral representation of \(\psi _*^{(\alpha )}\) function. Let \(m\in \mathbb {N}\), then

$$\begin{aligned} \psi _*^{(m)}(x)=E^m \psi (x)=(-1)^m \psi ^{(m)}(x)=-\int \limits _0^\infty \frac{t^m e^{-xt}}{1-e^{-t}} \mathrm {d}t \end{aligned}$$

hence we have

$$\begin{aligned}&\psi _*^{(\alpha )}(x)=W^{\alpha -\lceil \alpha \rceil } \left( E^{\lceil \alpha \rceil } \psi (x) \right) \\&=\frac{1}{\Gamma (\lceil \alpha \rceil -\alpha )} \int \limits _x^\infty (\xi -x)^{\lceil \alpha \rceil -\alpha -1} \left( -\int \limits _0^\infty \frac{t^{\lceil \alpha \rceil }e^{-\xi t}}{1-e^{-t}} \mathrm {d}t \right) \mathrm {d}\xi \\&=-\int \limits _0^\infty \left( \frac{1}{\Gamma (\lceil \alpha \rceil -\alpha )} \int \limits _x^\infty (\xi -x)^{\lceil \alpha \rceil -\alpha -1} e^{-\xi t} \mathrm {d}\xi \right) \frac{t^{\lceil \alpha \rceil }}{1-e^{-t}} \mathrm {d}t =-\int \limits _0^\infty \frac{t^\alpha e^{-xt}}{1-e^{-t}} \end{aligned}$$

where \(\alpha >0\).

The series representation of \(\psi _*^{(\alpha )}\) function is of the form

$$\begin{aligned} \psi _*^{(m)}(x)=E^m \psi (x)=(-1)^m \psi ^{(m)}(x)=- \sum _{n=0}^\infty \frac{m!}{(x+n)^{m+1}}, \quad m \in \mathbb {N}, \end{aligned}$$
$$\begin{aligned} \begin{aligned}&\psi _*^{(\alpha )}(x)=W^{\alpha -\lceil \alpha \rceil } \left( E^{\lceil \alpha \rceil }\right) \\&=\frac{1}{\Gamma (\lceil \alpha \rceil -\alpha )}\int \limits _x^\infty (\xi -x)^{\lceil \alpha \rceil -\alpha -1} \left( -\Gamma (\lceil \alpha \rceil +1)\sum _{n=0}^\infty \frac{1}{(\xi +n)^{\lceil \alpha \rceil +1}} \right) \mathrm {d}\xi \\&=-\Gamma (\lceil \alpha \rceil +1) \sum _{n=0}^\infty \frac{1}{\Gamma (\lceil \alpha \rceil -\alpha )} \int \limits _x^\infty \frac{(\xi -x)^{\lceil \alpha \rceil -\alpha -1}}{(\xi +n)^{\lceil \alpha \rceil +1}} \mathrm {d}\xi \\&=- \sum _{n=0}^\infty \frac{\Gamma (\alpha +1)}{(x+n)^{\alpha +1}}, \end{aligned} \end{aligned}$$
(10)

for every \(\alpha >0\). From this relation we get also

$$\begin{aligned} \psi _*^{(\alpha )}(1)= -\Gamma (\alpha +1)\zeta (\alpha +1) \end{aligned}$$
(11)

for \(\alpha >0\), where \(\zeta (\cdot )\) denotes the zeta function.

1.3 Harmonic Numbers of Order \(r>1\)

From formula (9) we obtain the following relations

$$\begin{aligned} \psi _*^{(\alpha )}&(k+1)-\psi _*^{(\alpha )}(k)=\frac{\Gamma (\alpha +1)}{k^{\alpha +1}},\end{aligned}$$
(12)
$$\begin{aligned} H_n^{(r)}:=\sum _{k=1}^n \frac{1}{k^r}=&\frac{1}{\Gamma (r)}\left( \psi _*^{(r-1)}(n+1)-\psi _*^{(r-1)}(1)\right) , \quad r>1. \end{aligned}$$
(13)

The last formula can be considered as the generalization of formula (1) for \(r>1\). The numbers \(H_n^{(r)}\), \(n \in \mathbb {N}\), \(r \in \mathbb {R}\), \(r>1\) will be called the n-th harmonic numbers of order r.

Moreover, we set

$$\begin{aligned} H_n^{(r)}(x) := \sum _{k=1}^n \frac{1}{(k+x)^r} = \frac{1}{\varGamma (r)} \left( \psi _*^{(r-1)}(n+1+x) - \psi _*^{(r-1)}(x) \right) . \end{aligned}$$
(14)

We define also the generalized odd harmonic numbers of order \(r>1\) in the following way

$$\begin{aligned} O_n^{(r)}:=\sum _{k=1}^n \frac{1}{(2k-1)^r}= H_{2n}^{(r)} - \sum _{k=1}^n \frac{1}{(2k)^r} = H_{2n}^{(r)}-\frac{1}{2^r}H_n^{(r)}. \end{aligned}$$
(15)

Let us note that in paper [8] (see also [9]) the following interesting relation is proven

$$\sum _{k=1}^\infty (-1)^{k-1} \left( O_{kn}^{(1)} - O_{kn-n}^{(1)}\right) = \frac{\pi }{2n} \left( \frac{1}{4}(1-(-1)^n) + \sum _{1 \le 2k-1<n}\csc \frac{(2k-1)\pi }{2n} \right) .$$

Remark 2

Given here formulas (13)–(15) can be generalized for the complex variable \(r \in \mathbb {C}\), \({\text {Re}} r >1\). To do this we should analyze the performed above discussion starting with formula (2).

1.4 Selected Identities for the Generalized Harmonic Numbers

We have

$$\begin{aligned} \sum _{k=1}^n \frac{H_k^{(a)}}{k^b}=\sum _{k=1}^n \frac{\psi _*^{(a-1)}(k + 1)-\psi _*^{(a-1)}(1)}{\Gamma (a)k^b} \mathop {=}\limits ^{(11)} \sum _{k=1}^n \frac{\psi _*^{(a-1)}(k+1)}{\Gamma (a)k^b}+ \zeta (a)H_n^{(b)} \end{aligned}$$

for any \(a, b>1\). Hence, if \(n \rightarrow \infty \), then we get

$$\begin{aligned} \begin{aligned}&\sum _{k=1}^\infty \frac{H_k^{(a)}}{k^b}=\sum _{k=1}^\infty \frac{\psi _*^{(a-1)}(k+1)}{\Gamma (a)k^b}+\zeta (a)\zeta (b)\\&\mathop {=}\limits ^{(10)} \zeta (a)\zeta (b)- \sum _{k=1}^\infty \sum _{j=0}^\infty \frac{1}{(k+j+1)^ak^b}. \end{aligned} \end{aligned}$$
(16)

Similarly we can determine the more general sums

$$\begin{aligned}&\sum _{k=1}^n \frac{H_k^{a}H_k^{b}}{k^c} = \sum _{k=1}^n \frac{ \left( \psi _*^{(a-1)}(k+1) - \psi _*^{(a-1)}(1)\right) \left( \psi _*^{(b-1)}(k+1) - \psi _*^{(b-1)}(1)\right) }{ \varGamma (a) \varGamma (b) k^c}\\&\mathop {=}\limits ^{(11)}\sum _{k=1}^n \frac{ \psi _*^{(a-1)}(k+1) \psi _*^{(b-1)}(k+1)}{ \varGamma (a) \varGamma (b) k^c} + \sum _{k=1}^n \frac{ \psi _*^{(a-1)}(k+1) \zeta (a)}{ \varGamma (b) k^c}\\&\ + \sum _{k=1}^n \frac{ \psi _*^{(b-1)}(k+1) \zeta (b)}{ \varGamma (a) k^c}+ \zeta (a) \zeta (b)H_n^{(c)} \end{aligned}$$

for any \(a,b,c>1\). If \(n \rightarrow \infty \), then we obtain

$$\begin{aligned} \begin{aligned}&\sum _{k=1}^\infty \frac{H_k^{a}H_k^{b}}{k^c} = \sum _{k=1}^\infty \frac{ \psi _*^{(a-1)}(k+1) \psi _*^{(b-1)}(k+1)}{ \varGamma (a) \varGamma (b) k^c} \\&+ \sum _{k=1}^\infty \frac{ \psi _*^{(a-1)}(k+1) \zeta (a)}{ \varGamma (b) k^c}+ \sum _{k=1}^\infty \frac{ \psi _*^{(b-1)}(k+1) \zeta (b)}{ \varGamma (a) k^c}+ \zeta (a) \zeta (b)\zeta (c) \\&\mathop {=}\limits ^{(10)} \zeta (a) \zeta (b)\zeta (c) + \sum _{k=1}^\infty \frac{1}{k^c}\cdot \left( \sum _{j=0}^\infty \frac{1}{(k+1+j)^a } \cdot \sum _{j=0}^\infty \frac{1}{(k+1+j)^b }\right) \\&-\frac{\varGamma (a) \zeta (a) }{\varGamma (b)}\sum _{k=1}^\infty \sum _{j=0}^\infty \frac{1}{k^c (k+1+j)^a }- \frac{\varGamma (b) \zeta (b) }{\varGamma (a)}\sum _{k=1}^\infty \sum _{j=0}^\infty \frac{1}{k^c (k+1+j)^b }. \end{aligned} \end{aligned}$$
(17)

Only when \(a,b,c \in \mathbb {N}\), then we can give to the right hand sides of formulas (16), (17) the form using the finite sum, for example (see [4, formula (9)]):

$$\begin{aligned}&\sum _{n=1}^\infty \frac{H_n}{(n+x)^b}=\frac{(-1)^b}{(b-1)!} \Bigg [ (\psi (x)+\gamma ) \psi ^{(b-1)}(x) -\frac{1}{2}\psi ^{(b)}(x) \\&+ \sum _{m=1}^{b-2} \left( {\begin{array}{c}b-2\\ m\end{array}}\right) \psi ^{(m)}(x) \psi ^{(b-m-1)}(x) \Bigg ], \end{aligned}$$

where \(b\in \mathbb {N}\), \(b\not =1\), \(x \in \mathbb {R} {\setminus } \{ -1,-2,-3,\ldots \}\).

2 Wolstenholme’s-Type Relations for the Harmonic Numbers and the Generalized Harmonic Numbers

Definition 3

Let \(x,y \in \mathbb {Q}\) and \(m \in \mathbb {N}\). The numbers x and y are congruent modulo m if their difference can be expressed as a reduced fraction of the form \(\frac{mp}{q}\), where \(\gcd (q,m)=\gcd (q,p)=1\). This definition can be written as follows

$$x \equiv y \;\;\, (\text {mod } m) \Leftrightarrow \exists \,\, p,q \in \mathbb {N} :\gcd (q,m)=\gcd (q,p)=1 \text { and } |x-y| = m \, \frac{p}{q}.$$

We will use also the notation \(x \equiv _m y\), which is equivalent to \(x \equiv y \;\;\, (\text {mod } m)\).

For example, note that \(2 \cdot 4 \equiv 1, \quad 3 \cdot 3 \equiv 2, \quad 6 \cdot 6 \equiv 1 \;\;\, (\text {mod } 7), \) so we get

$$\frac{1}{2} \equiv 4, \quad \frac{1}{4} \equiv 2, \quad \frac{2}{3} \equiv 3, \quad \frac{1}{6} \equiv 6 \;\;\, (\text {mod } 7). $$

Joseph Wolstenholme in [10] (see also [11, 12]) proved that for \(p \in \mathbb {P}\) (where \(\mathbb {P}\) denotes the set of all prime numbers), \(p\ge 5,\) the following congruences hold true

$$\begin{aligned} H_{p-1}&\equiv 0 \;\;\, (\text {mod } p^2),\end{aligned}$$
(18)
$$\begin{aligned} H_{p-1}^{(2)}&\equiv 0 \;\;\, (\text {mod } p). \end{aligned}$$
(19)

We will apply many times this result in the proofs of congruence relations given in the following subsection.

2.1 Our Results – Congruence Relations for the Harmonic Numbers and the Generalized Harmonic Numbers

The following relations hold true

  1. 1.

    For \(p \in \mathbb {P}\), \(p \ge 5,\) we have \(\displaystyle \sum _{k=1}^{p-1} \frac{H_k}{k} \equiv 0 \;\;\, (\text {mod } p)\).

Proof

Let us note that

$$\sum _{k=1}^{p-1} \left( H_k - \frac{1}{k} \right) ^2 - \sum _{k=1}^{p-1} H_k^2 - \sum _{k=1}^{p-1} \frac{1}{k^2} = -2 \sum _{k=1}^{p-1} \frac{H_k}{k},$$

since \(H_k-\frac{1}{k}=H_{k-1}\) and \( H_{p-1}^{(2)}=\sum \limits _{k=1}^{p-1} \frac{1}{k^2}\). Thus we have

$$\sum _{k=1}^{p-2} H_k ^2 - \sum _{k=1}^{p-1} H_k^2 - H_{p-1}^{(2)} = -2 \sum _{k=1}^{p-1} \frac{H_k}{k}.$$

Hence we get

$$ H_{p-1}^2 + H_{p-1}^{(2)} = 2 \sum _{k=1}^{p-1} \frac{H_k}{k}.$$

From relations (18) and (19) we conclude the thesis.

  1. 2.

    For \(p \in \mathbb {P}\), \(p \ge 3,\) it holds that \(\displaystyle \sum _{k=1}^{p-1} H_k \equiv 1 \;\;\, (\text {mod } p)\).

Proof

We compute

$$\begin{aligned}&\sum _{k=1}^{p-1} H_k = \sum _{k=1}^{p-1} \sum _{n=1}^k \frac{1}{n} = \sum _{n=1}^{p-1}\sum _{k=n}^{p-1} \frac{1}{n} = \sum _{n=1}^{p-1} \frac{p-n}{n}=\sum _{n=1}^{p-1} \left( \frac{p}{n} -1 \right) \\&=\left( \sum _{n=1}^{p-1} \frac{p}{n}\right) - (p-1) \equiv _p 1. \end{aligned}$$
  1. 3.

    For \(p \in \mathbb {P}\), \(p \ge 3,\) we have \(\displaystyle \sum _{k=1}^{p-1} H_k^2 \equiv p-2 \;\;\, (\text {mod } p)\).

Proof

We execute the following transformations

$$\begin{aligned}&\sum _{k=1}^{p-1} H_k^2 =\sum _{k=1}^{p-1} \left( \sum _{n=1}^k \frac{1}{n} \right) ^2 = \sum _{k=1}^{p-1} \sum _{n=1}^k \frac{1}{n^2} + \sum _{k=1}^{p-1} \sum _{1 \le n<m \le k} \frac{2}{mn} \\ =&\sum _{n=1}^{p-1} \sum _{k=n}^{p-1} \frac{1}{n^2} + \sum _{k=1}^{p-1} \sum _{n=1 }^k \sum _{m=n+1}^k \frac{2}{mn}=\sum _{n=1}^{p-1} \frac{p-n}{n^2} + \sum _{n=1}^{p-1} \sum _{k=n }^{p-1} \sum _{m=n+1}^k \frac{2}{mn} \\ \equiv _p&\sum _{n=1}^{p-1} \frac{-1}{n} + \sum _{n=1}^{p-1} \sum _{m=n+1 }^{p-1} \frac{2(p-m)}{mn}\mathop {\equiv _p}\limits ^{(18)} \sum _{n=1}^{p-1} \sum _{m=n+1 }^{p-1} \frac{-2}{n} \\ \equiv _p&\sum _{n=1}^{p-1} \frac{-2(p-1-n)}{n} \equiv _p \sum _{n=1}^{p-1} \left( \frac{2}{n}+2\right) \\ \equiv _p&2H_{p-1} +2(p-1) \mathop {\equiv _p}\limits ^{ (18)} -2 \equiv _p p-2. \end{aligned}$$

Corollary 1

Let \(\{p_n \}_{n \in \mathbb {N}}\) be a sequence of the successive prime numbers and let \(S_n \in \{ 0,1,\ldots , p_n -1 \}\) be the remainder of dividing the number \(\sum \limits _{k=1}^{p_n-1} H_k^2\) by \(p_n\) in the sense of Definition 3. Then we have

$$S_n-S_{n-1}=p_n-p_{n-1}$$

for \(n\in \mathbb {N}\), \(n \ge 3\).

  1. 4.

    For \(p\in \mathbb {P}\), \(p \ge 5\) we have \(\displaystyle \sum _{k=1}^{p-1} H_k^2 \equiv 2(p-1) \;\;\, (\text {mod } p^2)\).

Proof

Proceeding in the same manner as in the proof of item 3 we obtain

$$\begin{aligned}&\sum _{k=1}^{p-1}H_k^2 = \sum _{n=1}^{p-1} \frac{p-n}{n^2} + \sum _{n=1}^{p-1} \sum _{m=n+1 }^{p-1} \frac{2(p-m)}{mn}\\&=pH_{p-1}^{(2)}-H_{p-1}+ p \sum _{n=1}^{p-1} \sum _{m=n+1 }^{p-1} \frac{2}{mn} - \sum _{n=1}^{p-1} \sum _{m=n+1 }^{p-1} \frac{2}{n}\\&\mathop {\equiv _{p^2}}\limits ^{(18),(19)} 2p \sum _{n=1}^{p-1} \frac{1}{n} (H_{p-1}-H_n) - \sum _{n=1}^{p-1} \frac{2(p-1-n)}{n} \\&\equiv _{p^2} 2p H_{p-1}^2 - 2p \sum _{n=1}^{p-1} \frac{H_n}{n} - 2p H_{p-1}+2H_{p-1}+2(p-1) \mathop {\equiv _{p^2} }\limits ^{1,(18),(19)} 2(p-1). \end{aligned}$$
  1. 5.

    For \(p \in \mathbb {P}\), \(p \ge 3,\) it holds \(\displaystyle \sum _{k=1}^{p-1} H_k^3 \equiv {\left\{ \begin{array}{ll} 1 \;\;\, (\text {mod } p) &{} \text {for } p \in \{3,5\},\\ 6 \;\;\, (\text {mod } p) &{} \text {for } p \ge 7. \end{array}\right. } \)

    In this case the proof runs analogically like in items 3 and 4 and it is omitted here.

    The following results are just the outcomes of the numerical experiment executed within the range of the initial two hundred prime numbers:

  2. 6.

    For \(p \in \mathbb {P}\), \(p \ge 7,\) it holds \(\displaystyle \sum _{k=1}^{p-1} \frac{H_k^2}{k^2} \equiv 0 \;\;\, (\text {mod } p)\).

  3. 7.

    For \(p \in \mathbb {P}\), \(p \ge 5,\) it holds \(\displaystyle \sum _{k=1}^{p-1} \frac{H_k^3}{k} \equiv 0 \;\;\, (\text {mod } p)\).

  4. 8.

    For \(p \in \mathbb {P}\), \(p \ge 7,\) it holds \(\displaystyle \sum _{k=1}^{p-1} \frac{H_k}{k^3} \equiv 0 \;\;\, (\text {mod } p)\).

  5. 9.

    For \(p \in \mathbb {P}\), \(p \ge 3,\) it holds \(\displaystyle \sum _{k=1}^{p-1} \frac{H_k}{k(k+1)} \equiv 0 \;\;\, (\text {mod } p)\).

  6. 10.

    For \(p \in \mathbb {P}\), \(p \ge 5,\) it holds \(\displaystyle \sum _{k=1}^{p-1} \frac{H_k^3}{k(k+1)} \equiv 0 \;\;\, (\text {mod } p)\).

  7. 11.

    For \(p \in \mathbb {P}\), \(p \ge 7,\) it holds

    $$ \sum _{k=1}^{p-1} \frac{H_k - H_k^{(2)} }{k^2} \equiv -\sum _{k=1}^{p-1} \frac{H_k^{(2)}}{k} \equiv \sum _{k=1}^{p-2} \frac{H_k}{(k+1)^2} \;\;\, (\text {mod } p).$$

At the end let as also present the Maclaurin series expansion of the sum involving the harmonic numbers, in which we are interested in this paper. This expansion reveals the connection between the values of the zeta function for odd positive integers and the harmonic numbers (each coefficient of this expansion possesses this property which we confirmed numerically for the first twenty coefficients – we present only the first eight coefficients, see also [13]):

$$\begin{aligned}&\sum _{n=1}^\infty \frac{H_n}{(n+x)^2} = 2 \zeta (3)+ \sum _{k=1}^\infty \sum _{n=1}^\infty \frac{(-1)^k (k+1) H_n}{(n+x)^{k+2}}x^k=\\&= 2 \zeta (3)-\frac{\pi ^4 x}{36}+\left( -\frac{1}{2} \pi ^2 \zeta (3)+9 \zeta (5)\right) x^2 +\left( -\frac{\pi ^6}{135}+2 \zeta (3)^2\right) x^3+\\&+\left( -\frac{1}{18} \pi ^4 \zeta (3)-\frac{5}{6} \pi ^2 \zeta (5)+20 \zeta (7)\right) x^4+\left( -\frac{\pi ^8}{700}+6 \zeta (3) \zeta (5)\right) x^5+\\&+\left( -\frac{1}{270} \pi ^2 \left( 2 \pi ^4 \zeta (3)+21 \pi ^2 \zeta (5)+315 \zeta (7)\right) +35 \zeta (9)\right) x^6+\\&+\left( -\frac{2 \pi ^{10}}{8505}+4 \zeta (5)^2+8 \zeta (3) \zeta (7)\right) x^7+\ldots \end{aligned}$$

Let us recall that it remains an open problem whether all the numbers \(\zeta (2n-1),\ n\in \mathbb {N}\) are irrational.

Final remark 1 Some other generalizations of the harmonic numbers are also discussed in literature, for example in papers [14, 15] there are defined and investigated the so called Hyperharmonic numbers. Moreover, see the papers: [1620].