# 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:

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

Then

Integrate both sides from 0 to 1.

So when x is an integer,

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

## Second approach

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

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

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

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).

The digamma function satisfies an addition rule

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

## One thought on “Extending harmonic numbers”

1. GlennF

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.