Starting from n = 1, the sequence of harmonic numbers begins:
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 have been studied since 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.
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 regarding the long tail and the theory of network value.
Using the substitution x = 1 −u, another expression for Hn is
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
whose value is ln n.
The harmonic numbers have several interesting arithmetic properties. It is well-known that is an integer if and only if, a result often attributed to Taeisinger.[6] Indeed, using 2-adic valuation, it is not difficult to prove that for the numerator of is an odd number while the denominator of is an even number. More precisely,
with some odd integers and .
As a consequence of Wolstenholme's theorem, for any prime number the numerator of is divisible by . Furthermore, Eisenstein[7] proved that for all odd prime number it holds
where is a Fermat quotient, with the consequence that divides the numerator of if and only if is a Wieferich prime.
In 1991, Eswarathasan and Levine[8] defined as the set of all positive integers such that the numerator of is divisible by a prime number They proved that
for all prime numbers and they defined harmonic primes to be the primes such that has exactly 3 elements.
Eswarathasan and Levine also conjectured that is a finite set for all primes and that there are infinitely many harmonic primes. Boyd[9] verified that is finite for all prime numbers up to except 83, 127, and 397; and he gave a heuristic suggesting that the density of the harmonic primes in the set of all primes should be . Sanna[10] showed that has zero asymptotic density, while Bing-Ling Wu and Yong-Gao Chen[11] proved that the number of elements of not exceeding is at most , for all .
The harmonic numbers appear in several calculation formulas, such as the digamma function
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:
although
converges more quickly.
The eigenvalues of the nonlocal problem on
are given by , where by convention , and the corresponding eigenfunctions are given by the Legendre polynomials.[13]
Generalized harmonic numbers
The nth generalized harmonic number of order m is given by
(In some sources, this may also be denoted by or )
The special case m = 0 gives The special case m = 1 reduces to the usual harmonic number:
The limit of as n → ∞ is finite if m > 1, with the generalized harmonic number bounded by and converging to the Riemann zeta function
The 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) is, for n=1, 2, ...:
Some integrals of generalized harmonic numbers are
and
where A is Apéry's constantζ(3),
and
Every generalized harmonic number of order m can be written as a function of harmonic numbers of order using
for example:
A generating function for the generalized harmonic numbers is
where is the polylogarithm, and |z| < 1. The generating function given above for m = 1 is a special case of this formula.
A fractional argument for generalized harmonic numbers can be introduced as follows:
For every integer, and integer or not, we have from polygamma functions:
where is the Riemann zeta function. The relevant recurrence relation is
Some special values arewhere G is Catalan's constant. In the special case that , we get
where is the Hurwitz zeta function. This relationship is used to calculate harmonic numbers numerically.
The next generalization was discussed by J. H. Conway and R. K. Guy in their 1995 book The Book of Numbers.[2]:258 Let
Then the nth hyperharmonic number of order r (r>0) is defined recursively as
In particular, is the ordinary harmonic number .
Roman Harmonic numbers
The Roman Harmonic numbers,[14] named after Steven Roman, were introduced by Daniel Loeb and Gian-Carlo Rota in the context of a generalization of umbral calculus with logarithms.[15] There are many possible definitions, but one of them, for , isandOf course,
In fact, these numbers were defined in a more general manner using Roman numbers and Roman factorials, that include negative values for . This generalization was useful in their study to define Harmonic logarithms.
This section does not cite any sources. (May 2019)
The formulae given above,
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
where ψ(x) is the digamma function, and γ is the Euler–Mascheroni constant. The integration process may be repeated to obtain
The Taylor series for the harmonic numbers is
which comes from the Taylor series for the digamma function ( is the Riemann zeta function).
Alternative, asymptotic formulation
When seeking to approximateHx for a complex numberx, it is effective to first computeHm for some large integerm. Use that as an approximation for the value ofHm+x. Then use the recursion relation Hn = Hn−1 + 1/n backwardsm times, to unwind it to an approximation forHx. Furthermore, this approximation is exact in the limit asm goes to infinity.
Specifically, for a fixed integern, it is the case that
Ifn is not an integer then it is not possible to say whether this equation is true because we have not yet (in this section) defined harmonic numbers for non-integers. However, we do get a unique extension of the harmonic numbers to the non-integers by insisting that this equation continue to hold when the arbitrary integern is replaced by an arbitrary complex numberx,
Swapping the order of the two sides of this equation and then subtracting them fromHx gives
This infinite series converges for all complex numbersx except the negative integers, which fail because trying to use the recursion relation Hn = Hn−1 + 1/n backwards through the valuen = 0 involves a division by zero. By this construction, the function that defines the harmonic number for complex values is the unique function that simultaneously satisfies (1) H0 = 0, (2) Hx = Hx−1 + 1/x for all complex numbersx except the non-positive integers, and (3) limm→+∞ (Hm+x − Hm) = 0 for all complex valuesx.
This last formula can be used to show that
whereγ is the Euler–Mascheroni constant or, more generally, for everyn we have:
Special values for fractional arguments
There are the following special analytic values for fractional arguments between 0 and 1, given by the integral
More values may be generated from the recurrence relation
or from the reflection relation
For example:
Which are computed via Gauss's digamma theorem, which essentially states that for positive integers p and q with p < q
Relation to the Riemann zeta function
Some derivatives of fractional harmonic numbers are given by
Eisenstein, Ferdinand Gotthold Max (1850). "Eine neue Gattung zahlentheoretischer Funktionen, welche von zwei Elementen ahhängen und durch gewisse lineare Funktional-Gleichungen definirt werden". Berichte Königl. Preuβ. Akad. Wiss. Berlin. 15: 36–42.
Chen, Yong-Gao; Wu, Bing-Ling (2017). "On certain properties of harmonic numbers". Journal of Number Theory. 175: 66–86. doi:10.1016/j.jnt.2016.11.027.
Donald Knuth (1997). "Section 1.2.7: Harmonic Numbers". The Art of Computer Programming. Vol.1: Fundamental Algorithms (Thirded.). Addison-Wesley. pp.75–79. ISBN978-0-201-89683-1.