Extending harmonic numbers

For a positive integer n, the nth harmonic number is defined to be the sum of the reciprocals of the first n positive integers:

H_n = 1 + \frac{1}{2} + \frac{1}{3} + \cdots + \frac{1}{n}

How might we extend this definition so that n does not have to be a positive integer?

First approach

One way to extend harmonic numbers is as follows. Start with the equation

(t - 1)(t^{n-1} + t^{n-2} + t^{n-3} + \cdots + 1) = t^n - 1


\frac{t^n - 1}{t-1} = t^{n-1} + t^{n-2} + t^{n-3} + \cdots + 1

Integrate both sides from 0 to 1.

\int_0^1\frac{t^n - 1}{t-1} \,dt = \frac{1}{n} + \frac{1}{n-1} + \frac{1}{n-2} + \cdots + 1 = H_n

So when x is an integer,

H_x = \int_0^1\frac{t^x - 1}{t-1} \,dt

is a theorem. When x is not an integer, we take this as a definition.

Second approach

Another approach is to start with the identity

\Gamma(x+1) = x\, \Gamma(x)

then take the logarithm and derivative of both sides. This gives

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

where the digamma function ψ is defined to be the derivative of the log of the gamma function.

If x is an integer and we apply the identity above repeatedly we get

\psi(n+1) = H_n + \psi(1) = H_n - \gamma

where γ is Euler’s constant. Then we can define

H_x = \psi(x + 1) + \gamma

for general values of x.

Are they equal?

We’ve shown two ways of extending the harmonic numbers. Are these two different extensions or are they equal? They are in fact equal, which follows from equation 12.16 in Whittaker and Watson, citing a theorem of Legendre.

Taking either approach as our definition we could, for example, compute the πth harmonic number (1.87274) or even the ith harmonic number (0.671866 + 1.07667i).

An addition rule

The digamma function satisfies an addition rule

\psi(2z) = \frac{1}{2} \left( \psi(z) + \psi\left(z + \frac{1}{2}\right)\right) + \log 2


which can be proved by taking the logarithm and derivative of Gauss’s multiplication rule for the gamma function.

Let z = x + 1/2 and add γ to both sizes. This shows that harmonic numbers satisfy the addition rule

H_{2x} = \frac{1}{2}\left( H_{x-1/2} + H_x \right) + \log 2

Related posts

One thought on “Extending harmonic numbers

  1. Playing around with the addition rule also yields:

    H_{2 x} = H_{2 x – 1} + \frac{1}{2} ( H_{x} – H_{x-1} )

    Which is obvious for integer x, but less so for non-integer x.

Leave a Reply

Your email address will not be published. Required fields are marked *