Neha Patil (Editor)

Harmonic number

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
1
  
1

1
  
1

3
  
/2

1
  
1

2
  
3

/2
  
1.5

Harmonic number

In mathematics, the n-th harmonic number is the sum of the reciprocals of the first n natural numbers:

Contents

H n = 1 + 1 2 + 1 3 + + 1 n = k = 1 n 1 k .

Harmonic numbers are related to the harmonic mean in that the n-th harmonic number is also n times the reciprocal of the harmonic mean of the first n positive integers.

Harmonic numbers were studied in antiquity and are important in various branches of number theory. They are sometimes loosely termed harmonic series, are closely related to the Riemann zeta function, and appear in the expressions of various special functions.

The harmonic numbers roughly approximate the natural logarithm function and thus the associated harmonic series grows without limit, albeit slowly. In 1737, Leonhard Euler used the divergence of the harmonic series to provide a new proof of the infinity of prime numbers. His work was extended into the complex plane by Bernhard Riemann in 1859, leading directly to the celebrated Riemann hypothesis about the distribution of prime numbers.

When the value of a large quantity of items has a Zipf's law distribution, the total value of the n most-valuable items is proportional to the n-th harmonic number. This leads to a variety of surprising conclusions in the Long Tail and the theory of network value.

Bertrand's postulate entails that, except for the case n = 1, the harmonic numbers are never integers.

Identities involving harmonic numbers

By definition, the harmonic numbers satisfy the recurrence relation

H n = H n 1 + 1 n .

The harmonic numbers are connected to the Stirling numbers of the first kind:

H n = 1 n ! [ n + 1 2 ] .

The functions

f n ( x ) = x n n ! ( log x H n )

satisfy the property

f n ( x ) = f n 1 ( x ) .

In particular

f 1 ( x ) = x ( log x 1 )

is an integral of the logarithmic function.

The harmonic numbers satisfy the series identity

k = 1 n H k = ( n + 1 ) [ H n + 1 1 ] .

Identities involving π

There are several infinite summations involving harmonic numbers and powers of π:

n = 1 H n n 2 n = 1 12 π 2 n = 1 H n 2 ( n + 1 ) 2 = 11 360 π 4 n = 1 H n 2 n 2 = 17 360 π 4 n = 1 H n n 3 = 1 72 π 4

Calculation

An integral representation given by Euler is

H n = 0 1 1 x n 1 x d x .

The equality above is obvious by the simple algebraic identity

1 x n 1 x = 1 + x + + x n 1 .

Using the simple integral transform x = 1−u, an elegant combinatorial expression for Hn is

H n = 0 1 1 x n 1 x d x = 0 1 1 ( 1 u ) n u d u = 0 1 [ k = 1 n ( 1 ) k ( n k ) u k 1 ] d u = k = 1 n ( 1 ) k ( n k ) 0 1 u k 1 d u = k = 1 n ( 1 ) k 1 k ( n k ) .

The same representation can be produced by using the third Retkes identity by setting x 1 = 1 , , x n = n and using the fact that Π k ( 1 , , n ) = ( 1 ) n k ( k 1 ) ! ( n k ) !

H n = H n , 1 = k = 1 n 1 k = ( 1 ) n n ! k = 1 n 1 k 2 Π k ( 1 , , n ) = k = 1 n ( 1 ) k 1 k ( n k ) .

The nth harmonic number is about as large as the natural logarithm of n. The reason is that the sum is approximated by the integral

1 n 1 x d x

whose value is ln(n).

The values of the sequence Hn - ln(n) decrease monotonically towards the limit

lim n + ( H n ln n ) = γ ,

where γ ≈ 0.5772156649 is the Euler–Mascheroni constant. The corresponding asymptotic expansion as n → +∞ is

H n = ln n + γ + 1 2 n k = 1 B 2 k 2 k n 2 k = ln n + γ + 1 2 n 1 12 n 2 + 1 120 n 4 ,

where B k are the Bernoulli numbers.

Generating functions

A generating function for the harmonic numbers is

n = 1 z n H n = ln ( 1 z ) 1 z ,

where ln(z) is the natural logarithm. An exponential generating function is

n = 1 z n n ! H n = e z k = 1 1 k ( z ) k k ! = e z Ein ( z )

where Ein(z) is the entire exponential integral. Note that

Ein ( z ) = E 1 ( z ) + γ + ln z = Γ ( 0 , z ) + γ + ln z

where Γ(0, z) is the incomplete gamma function.

Arithmetic properties

The harmonic numbers have several interesting arithmetic properties. It is well-known that H n is an integer if and only if n = 1 , a result often attributed to Taeisinger. Indeed, using 2-adic valuation, it is not difficult to prove that for n 2 the numerator of H n is an odd number while the denominator of H n is an even number.

As a consequence of Wolstenholme's theorem, for any prime number p 5 the numerator of H p 1 is divisible by p 2 . Furthermore, Eisenstein proved that for all odd prime number p it holds

H ( p 1 ) / 2 2 q p ( 2 ) ( mod p )

where q p ( 2 ) = ( 2 p 1 1 ) / p is a Fermat quotient, with the consequence that p divides the numerator of H ( p 1 ) / 2 if and only if p is a Wieferich prime. In 1991, Eswarathasan and Levine defined J ( p ) as the set of all positive integers n such that the numerator of H n is divisible by a prime number p . They proved that

{ p 1 , p 2 p , p 2 1 } J ( p )

for all prime numbers p 5 , and they called harmonic primes the primes p such that J ( p ) has exactly 3 elements.

Eswarathasan and Levine also conjectured that J ( p ) is a finite set all primes number p , and that there are infinitely many harmonic primes. Boyd verified that J ( p ) is finite for all prime numbers up to p = 547 , but 83, 127, and 397; and he gave an heuristic suggesting that the relatively density of the harmonic primes in the set of all primes should be 1 / e . Sanna showed that J p has zero asymptotic density, while Bing-Ling Wu and Yong-Gao Chen proved that the number of elements of J p not exceeding x is at most 3 x 2 3 + 1 25 log p , for all x 1 .

Applications

The harmonic numbers appear in several calculation formulas, such as the digamma function

ψ ( n ) = H n 1 γ .

This relation is also frequently used to define the extension of the harmonic numbers to non-integer n. The harmonic numbers are also frequently used to define γ using the limit introduced earlier:

γ = lim n + ( H n ln ( n ) ) ,

although

γ = lim n + ( H n ln ( n + 1 2 ) )

converges more quickly.

In 2002, Jeffrey Lagarias proved that the Riemann hypothesis is equivalent to the statement that

σ ( n ) H n + ln ( H n ) e H n ,

is true for every integer n ≥ 1 with strict inequality if n > 1; here σ(n) denotes the sum of the divisors of n.

The eigenvalues of the nonlocal problem

λ ϕ ( x ) = 1 1 ϕ ( x ) ϕ ( y ) | x y | d y

are given by λ = 2 H n , where by convention, H 0 = 0.

Generalized harmonic numbers

The generalized harmonic number of order n of m is given by

H n , m = k = 1 n 1 k m .

The limit as n tends to infinity is finite if m > 1.

Other notations occasionally used include

H n , m = H n ( m ) = H m ( n ) .

The special case of m = 0 gives H n , 0 = n

The special case of m = 1 is simply called a harmonic number and is frequently written without the m, as

H n = k = 1 n 1 k .

Smallest natural number k such that kn does not divide the denominator of generalized harmonic number H(k, n) nor the denominator of alternating generalized harmonic number H′(k, n) are

77, 20, 94556602, 42, 444, 20, 104, 42, 76, 20, 77, 110, 3504, 20, 903, 42, 1107, 20, 104, 42, 77, 20, 2948, 110, 136, 20, 76, 42, 903, 20, 77, 42, 268, 20, 7004, 110, 1752, 20, 19203, 42, 77, 20, 104, 42, 76, 20, 370, 110, 1107, 20, ... (sequence A128670 in the OEIS)

In the limit of n → +∞ for m > 1, the generalized harmonic number converges to the Riemann zeta function

lim n + H n , m = ζ ( m ) .

The related sum k = 1 n k m occurs in the study of Bernoulli numbers; the harmonic numbers also appear in the study of Stirling numbers.

Some integrals of generalized harmonic are

0 a H x , 2 d x = a π 2 6 H a

and

0 a H x , 3 d x = a A 1 2 H a , 2 , where A is the Apéry's constant, i.e. ζ(3).

and

k = 1 n H k , m = ( n + 1 ) H n , m H n , m 1   for m 0

Every generalized harmonic number of order m can be written as a function of harmonic of order m-1 using:

H n , m = k = 1 n 1 H k , m 1 k ( k + 1 ) + H n , m 1 n   for example: H 4 , 3 = H 1 , 2 1 2 + H 2 , 2 2 3 + H 3 , 2 3 4 + H 4 , 2 4

A generating function for the generalized harmonic numbers is

n = 1 z n H n , m = L i m ( z ) 1 z ,

where L i m ( z ) is the polylogarithm, and {{math1=| z | < 1}}. The generating function given above for m = 1 is a special case of this formula.

Fractional argument for generalized harmonic numbers can be introduced as follows:

For every p , q > 0 integer, and m > 1 integer or not, we have from polygamma functions:

H q / p , m = ζ ( m ) p m k = 1 1 ( q + p k ) m

where ζ ( m ) is the Riemann zeta function. The relevant recurrence relation is:

H a , m = H a 1 , m + 1 a m

Some special values are:

H 1 4 , 2 = 16 8 G 5 6 π 2 where G is the Catalan's constant H 1 2 , 2 = 4 π 2 3 H 3 4 , 2 = 8 G + 16 9 5 6 π 2 H 1 4 , 3 = 64 27 ζ ( 3 ) π 3 H 1 2 , 3 = 8 6 ζ ( 3 ) H 3 4 , 3 = ( 4 3 ) 3 27 ζ ( 3 ) + π 3

Multiplication formulas

The multiplication theorem applies to harmonic numbers. Using polygamma functions, we obtain

H 2 x = 1 2 ( H x + H x 1 2 ) + ln 2 H 3 x = 1 3 ( H x + H x 1 3 + H x 2 3 ) + ln 3 ,

or, more generally,

H n x = 1 n ( H x + H x 1 n + H x 2 n + + H x n 1 n ) + ln n .

For generalized harmonic numbers, we have

H 2 x , 2 = 1 2 ( ζ ( 2 ) + 1 2 ( H x , 2 + H x 1 2 , 2 ) ) H 3 x , 2 = 1 9 ( 6 ζ ( 2 ) + H x , 2 + H x 1 3 , 2 + H x 2 3 , 2 ) ,

where ζ ( n ) is the Riemann zeta function.

Hyperharmonic numbers

The next generalization was discussed by J. H. Conway and R. K. Guy in their 1995 book The Book of Numbers. Let

H n ( 0 ) = 1 n .

Then the nth hyperharmonic number of order r (r>0) is defined recursively as

H n ( r ) = k = 1 n H k ( r 1 ) .

In particular, H n ( 1 ) is the ordinary harmonic number H n .

Harmonic numbers for real and complex values

The formulae given above,

H x = 0 1 1 t x 1 t d t = k = 1 + ( x k ) ( 1 ) k k

are an integral and a series representation for a function that interpolates the harmonic numbers and, via analytic continuation, extends the definition to the complex plane other than the negative integers x. The interpolating function is in fact closely related to the digamma function

H x = ψ ( x + 1 ) + γ ,

where ψ(x) is the digamma, and γ is the Euler-Mascheroni constant. The integration process may be repeated to obtain

H x , 2 = k = 1 ( 1 ) k k ( x k ) H k .

The Taylor series for the harmonic numbers is

H x = k = 2 ( 1 ) k ζ ( k ) x k 1  for  | x | < 1

which comes from the Taylor series for the digamma function.

Alternative, asymptotic formulation

When seeking to approximate Hx for a complex number x it turns out that it is effective to first compute Hm for some large integer m, then use that to approximate a value for Hm+x, and then use the recursion relation Hn = Hn−1 + 1/n backwards m times, to unwind it to an approximation for Hx. Furthermore, this approximation is exact in the limit as m goes to infinity.

Specifically, for every integer n, we have that

lim m + [ H m H m + n ] = 0 ,

and we can ask that the formula be obeyed if the arbitrary integer n is replaced by an arbitrary complex number x

lim m + [ H m H m + x ] = 0 .

Adding Hx to both sides gives

H x = lim m + [ H m ( H m + x H x ) ] = lim m + [ ( k = 1 m 1 k ) ( k = 1 m 1 x + k ) ] = lim m + k = 1 m ( 1 k 1 x + k ) = x k = 1 + 1 k ( x + k ) .

This last expression for Hx is well defined for any complex number x except the negative integers, which fail because trying to use the recursion relation Hn = Hn−1 + 1/n backwards through the value n = 0 involves a division by zero. By construction, the function Hx is the unique function of x for which (1) H0 = 0, (2) Hx = Hx−1 + 1/x for all complex values x except the non-positive integers, and (3) limm→+∞ (Hm+xHm) = 0 for all complex values x.

Based on this last formula, it can be shown that:

0 1 H x d x = γ ,

where γ is the Euler–Mascheroni constant or, more generally, for every n we have:

0 n H x d x = n γ + ln ( n ! ) .

Special values for fractional arguments

There are the following special analytic values for fractional arguments between 0 and 1, given by the integral

H α = 0 1 1 x α 1 x d x .

More values may be generated from the recurrence relation

H α = H α 1 + 1 α ,

or from the reflection relation

H 1 α H α = π cot ( π α ) 1 α + 1 1 α .

For example:

H 1 2 = 2 2 ln 2 H 1 3 = 3 π 2 3 3 2 ln 3 H 2 3 = 3 2 ( 1 ln 3 ) + 3 π 6 H 1 4 = 4 π 2 3 ln 2 H 3 4 = 4 3 3 ln 2 + π 2 H 1 6 = 6 π 2 3 2 ln 2 3 2 ln 3 H 1 8 = 8 π 2 4 ln 2 1 2 { π + ln ( 2 + 2 ) ln ( 2 2 ) } H 1 12 = 12 3 ( ln 2 + ln 3 2 ) π ( 1 + 3 2 ) + 2 3 ln ( 2 3 )

For positive integers p and q with p < q, we have:

H p q = q p + 2 k = 1 q 1 2 cos ( 2 π p k q ) ln ( sin ( π k q ) ) π 2 cot ( π p q ) ln ( 2 q )

Relation to the Riemann zeta function

Some derivatives of fractional harmonic numbers are given by:

d n H x d x n = ( 1 ) n + 1 n ! [ ζ ( n + 1 ) H x , n + 1 ] d n H x , 2 d x n = ( 1 ) n + 1 ( n + 1 ) ! [ ζ ( n + 2 ) H x , n + 2 ] d n H x , 3 d x n = ( 1 ) n + 1 1 2 ( n + 2 ) ! [ ζ ( n + 3 ) H x , n + 3 ] .

And using Maclaurin series, we have for x < 1:

H x = n = 1 ( 1 ) n + 1 x n ζ ( n + 1 ) H x , 2 = n = 1 ( 1 ) n + 1 ( n + 1 ) x n ζ ( n + 2 ) H x , 3 = 1 2 n = 1 ( 1 ) n + 1 ( n + 1 ) ( n + 2 ) x n ζ ( n + 3 ) .

For fractional arguments between 0 and 1, and for a > 1:

H 1 a = 1 a ( ζ ( 2 ) 1 a ζ ( 3 ) + 1 a 2 ζ ( 4 ) 1 a 3 ζ ( 5 ) + ) H 1 a , 2 = 1 a ( 2 ζ ( 3 ) 3 a ζ ( 4 ) + 4 a 2 ζ ( 5 ) 5 a 3 ζ ( 6 ) + ) H 1 a , 3 = 1 2 a ( 2 3 ζ ( 4 ) 3 4 a ζ ( 5 ) + 4 5 a 2 ζ ( 6 ) 5 6 a 3 ζ ( 7 ) + ) .

References

Harmonic number Wikipedia