A harmonic number is a number of the form
|
(1)
|
for a positive integer , arising from truncation of the harmonic
series, with
.
A harmonic number can be expressed analytically as
|
(2)
|
where
is the Euler-Mascheroni constant and
is the digamma
function.
The first few harmonic numbers are 1,
,
,
,
, ... (OEIS A001008
and A002805). The numbers of digits
in the numerator of
for
, 1, ... are 1, 4, 41, 434, 4346, 43451, 434111, 4342303,
43428680, ... (OEIS A114467), with the corresponding
number of digits in the denominator
given by 1, 4, 40, 433, 4345, 43450, 434110, 4342302, 43428678, ... (OEIS A114468).
The ratios of these digit counts to
appear to approach
(OEIS A002285).
The first few indices
such that the numerator of
is prime are given by 2,
3, 5, 8, 9, 21, 26, 41, 56, 62, 69, ... (OEIS A056903).
E. W. Weisstein reported completing the search for prime numerators up to
on May 13, 2009. The following table summarizes the largest
values known at that time.
| decimal digits | discoverer | |
| 63942 | 27795 | E. W. Weisstein (Feb. 14, 2007) |
| 69294 | 30067 | E. W. Weisstein (Feb. 1, 2008) |
| 69927 | 30301 | E. W. Weisstein (Mar. 11, 2008) |
| 77449 | 33616 | E. W. Weisstein (Apr. 4, 2009) |
| 78128 | 33928 | E. W. Weisstein (Apr. 9, 2009) |
| 78993 | 34296 | E. W. Weisstein (Apr. 17, 2009) |
| 81658 | 35479 | E. W. Weisstein (May. 12, 2009) |
The denominators of appear never to be prime
except for the case
.
Furthermore, the denominator is never a prime
power (except for this case) since the denominator
is always divisible by the largest power
of 2 less than or equal to
, and also by any prime
with
.
The harmonic numbers are implemented as HarmonicNumber[n].
The values of
such that
equals or exceeds 1, 2, 3, ... are given by 1, 4, 11, 31, 83, 227, 616, 1674, ...
(OEIS A004080). Another interesting sequence
is the number of terms in the simple continued
fraction of
for
,
1, 2, ..., given by 1, 8, 68, 834, 8356, 84548, 841817, 8425934, 84277586, ... (OEIS
A091590). The length divided by
is conjectured to approach
(OEIS A089729).
The definition of harmonic numbers can also be extended to the complex plane, as illustrated above.
Based on their definition, harmonic numbers satisfy the obvious recurrence equation
|
(3)
|
with .
The related alternating harmonic numbers are obtained by alternating the signs in the defining sum.
For ,
the harmonic number
is never an integer, which can be proved by using the
strong triangle inequality to show that
the p-adic norm of
with
is greater than 1 for
. This result was proved in 1915 by Taeisinger, and the
more general result that any sum of two or more consecutive
reciprocals of positive
integers, not necessarily starting with 1, is never an integer
was proved by Kűrschák in 1918 (Hoffman 1998, p. 157).
For ,
the harmonic numbers have odd numerators
and even denominators.
The
th
harmonic number is given asymptotically by
|
(4)
|
where
is the Euler-Mascheroni constant (Conway
and Guy 1996; Havil 2003, pp. 79 and 89). The coefficient
of
is
,
where
is the Riemann zeta function. These coefficients
are
,
,
,
, ... for
, 2, .... Their reduced positive denominators are 12, 120, 252, 240, ... (OEIS A006953).
This formula is a special case of the Euler-Maclaurin
integration formulas (Havil 2003, p. 79).
B. Cloitre (pers. comm., Jan. 1, 2021) gave the asymptotic formula for the product
|
(5)
|
as the positive integer , where
is the Euler-Mascheroni
constant.
B. Cloitre (pers. comm., Oct. 29, 2026) also gave the generalization
|
(6)
|
for any fixed real number as the positive integer
, together with the product limit
|
(7)
|
where
is Apéry's constant.
Inequalities bounding include
|
(8)
|
(Young 1991; Havil 2003, pp. 73-75) and
|
(9)
|
(DeTemple 1991; Havil 2003, pp. 76-78).
An interesting analytic sum is given by
|
(10)
|
(Coffman 1987). Borwein and Borwein (1995) show that
|
(11)
| |||
|
(12)
| |||
|
(13)
| |||
|
(14)
| |||
|
(15)
|
where
is the Riemann zeta function. The first of
these had been previously derived by de Doelder (1991), and the third by Goldbach
in a 1742 letter to Euler (Borwein and Bailey 2003, pp. 99-100; Bailey et
al. 2007, p. 256). These identities are corollaries of the identity
|
(16)
|
(Borwein and Borwein 1995). Additional identities due to Euler are
|
(17)
| |||
|
(18)
|
for ,
3, ... (Borwein and Borwein 1995), where
is Apéry's constant.
These sums are related to so-called Euler
sums.
M. Bindhammer (pers. comm., Jul. 4, 2022) communicated the conditionally convergent identity
|
(19)
|
A general identity due to B. Cloitre (pers. comm., Jan. 7, 2006) is
|
(20)
|
for integers , where
is a Pochhammer symbol.
Gosper (1996) gave the interesting identity
|
(21)
| |||
|
(22)
|
where
is the incomplete gamma function and
is the Euler-Mascheroni
constant.
G. Huvent (2002) found the beautiful formula
|
(23)
|
A beautiful double series is given by
|
(24)
|
(Bailey et al. 2007, pp. 273-274). Another double sum is
|
(25)
|
for
(Sondow 2003, 2005).
There is an unexpected connection between the harmonic numbers and the Riemann hypothesis.
Generalized harmonic numbers in power , for nonnegative integers
, can be defined by the relationship
|
(26)
|
where
and
.
These numbers are implemented as HarmonicNumber[n,
r].
The numerators of the special case
are known as Wolstenholme numbers. B. Cloitre
(pers. comm., ) gave the surprising identity
|
(27)
|
which relates
to an indefinite version of a famous series for
.
also satisfies
|
(28)
|
where
is the Riemann zeta function. This follows
from the identity
|
(29)
|
where
is the trigamma function since
|
(30)
|
For
and odd
, the generalized harmonic numbers have the explicit
form
|
(31)
|
where
is the polygamma function,
is the gamma function,
and
is the Riemann zeta function.
The 2-index harmonic numbers satisfy the identity
|
(32)
|
(P. Simon, pers. comm., Aug. 30, 2004), where .
Sums of the generalized harmonic numbers include
|
(33)
|
for ,
where
is a polylogarithm,
|
(34)
| |||
|
(35)
| |||
|
(36)
| |||
|
(37)
| |||
|
(38)
| |||
|
(39)
|
where
is a dilogarithm and
is the golden ratio. The
first identity requires
. The first, third, fourth, and fifth identities
in this display are due to B. Cloitre (pers. comm., Oct. 4, 2004). In general,
|
(40)
|
for
(P. Simone, pers. comm., June 2, 2003). The power harmonic numbers also obey
the unexpected identity
|
(41)
|
(M. Trott, pers. comm.).
P. Simone (pers. comm., Aug. 30, 2004) showed that
|
(42)
|
where
is real and
|
(43)
| |||
|
(44)
| |||
|
(45)
| |||
|
(46)
|
This gives the special results
|
(47)
|
for ,
, and
, respectively, where
is Catalan's constant.
Conway and Guy (1996) define the second-order harmonic number by
|
(48)
| |||
|
(49)
| |||
|
(50)
|
the third-order harmonic number by
|
(51)
|
and the th-order
harmonic number, for positive integer
, by
|
(52)
|
A slightly different definition of a two-index harmonic number
is given by Roman (1992) in connection with the harmonic
logarithm. For integer
and nonnegative integer
, Roman (1992) defines this by
|
(53)
| |||
|
(54)
|
plus the recurrence relation
|
(55)
|
for ,
where
is the Roman symbol. For general
and
, this is equivalent to
|
(56)
|
and for ,
it simplifies to
|
(57)
|
For ,
the harmonic number can be written
|
(58)
|
where
is the Roman factorial and
is a Stirling
number of the first kind.
A separate type of number sometimes also called a "harmonic number" is a harmonic divisor number (or Ore number).