A harmonic number is a number of the form
(1)
|
arising from truncation of the harmonic series. 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).
These digits converge to what appears to be the decimal digits of
(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). The search for prime
numerators has been completed up to
by E. W. Weisstein (May 13, 2009), and the following
table summarizes the largest known values.
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), which 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 number formed by taking alternate signs in the sum also has an explicit analytic form
(4)
| |||
(5)
| |||
(6)
|
has the particularly beautiful
form
(7)
| |||
(8)
| |||
(9)
| |||
(10)
| |||
(11)
| |||
(12)
|
The harmonic number
is never an integer except for
, which can be proved by using the strong triangle inequality
to show that the 2-adic value of
is greater than 1 for
. This result was proved in 1915 by Taeisinger, and the
more general results that any number of consecutive terms not necessarily starting
with 1 never sum to an integer was proved by Kűrschák in 1918 (Hoffman
1998, p. 157).
The harmonic numbers have odd numerators and even denominators.
The th
harmonic number is given asymptotically by
(13)
|
where
is the Euler-Mascheroni constant (Conway
and Guy 1996; Havil 2003, pp. 79 and 89), where the general
th term is
, giving
, 120,
, 240, ... for
, 2, ... (OEIS A006953).
This formula is a special case of an Euler-Maclaurin
integration formulas (Havil 2003, p. 79).
Inequalities bounding
include
(14)
|
(Young 1991; Havil 2003, pp. 73-75) and
(15)
|
(DeTemple 1991; Havil 2003, pp. 76-78).
An interesting analytic sum is given by
(16)
|
(Coffman 1987). Borwein and Borwein (1995) show that
(17)
| |||
(18)
| |||
(19)
| |||
(20)
| |||
(21)
|
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
(22)
|
(Borwein and Borwein 1995). Additional identities due to Euler are
(23)
| |||
(24)
|
for ,
3, ... (Borwein and Borwein 1995), where
is Apéry's constant.
These sums are related to so-called Euler sums.
A general identity due to B. Cloitre (pers. comm., Jan. 7, 2006) is
(25)
|
where
is a Pochhammer symbol.
Gosper gave the interesting identity
(26)
| |||
(27)
|
where
is the incomplete gamma function and
is the Euler-Mascheroni
constant.
G. Huvent (2002) found the beautiful formula
(28)
|
A beautiful double series is given by
(29)
|
(Bailey et al. 2007, pp. 273-274). Another double sum is
(30)
|
for
(Sondow 2003, 2005).
There is an unexpected connection between the harmonic numbers and the Riemann hypothesis.
Generalized harmonic numbers in power can be defined by the relationship
(31)
|
where
(32)
|
These number 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
(33)
|
which relates
to an indefinite version of a famous series for
.
also satisfies
(34)
|
where
is the Riemann zeta function. This follows
from the identity
(35)
|
where
is the trigamma function since
(36)
|
For odd ,
the generalized harmonic numbers have the explicit form
(37)
|
where
is the polygamma function,
is the gamma function,
and
is the Riemann zeta function.
The 2-index harmonic numbers satisfy the identity
(38)
|
(P. Simon, pers. comm., Aug. 30, 2004).
Sums of the generalized harmonic numbers include
(39)
|
for ,
where
is a polylogarithm,
(40)
| |||
(41)
| |||
(42)
| |||
(43)
| |||
(44)
| |||
(45)
|
where equations (40), (41), (42), and (44) are due to B. Cloitre (pers. comm., Oct. 4,
2004) and
is a dilogarithm. In general,
(46)
|
(P. Simone, pers. comm. June 2, 2003). The power harmonic numbers also obey the unexpected identity
(47)
|
(M. Trott, pers. comm.).
P. Simone (pers. comm., Aug. 30, 2004) showed that
(48)
|
where
(49)
| |||
(50)
| |||
(51)
| |||
(52)
|
This gives the special results
(53)
|
for ,
respectively.
Conway and Guy (1996) define the second-order harmonic number by
(54)
| |||
(55)
| |||
(56)
|
the third-order harmonic number by
(57)
|
and the th-order
harmonic number by
(58)
|
A slightly different definition of a two-index harmonic number is given by Roman (1992) in connection with the harmonic logarithm. Roman (1992) defines this
by
(59)
| |||
(60)
|
plus the recurrence relation
(61)
|
For general
and
,
this is equivalent to
(62)
|
and for ,
it simplifies to
(63)
|
For ,
the harmonic number can be written
(64)
|
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).