THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
 Built-in Mathematica Symbol Tutorials »| See Also »| More About »

# HarmonicNumber

 gives the n harmonic number . HarmonicNumber[n, r]gives the harmonic number of order r.
• Mathematical function, suitable for both symbolic and numerical manipulation.
• The harmonic numbers are given by with .
First ten harmonic numbers:
Plot harmonic numbers:
Carry out sums involving harmonic numbers:
First ten harmonic numbers:
 Out[1]=

Plot harmonic numbers:
 Out[1]=

Carry out sums involving harmonic numbers:
 Out[1]=
 Scope   (8)
Evaluate exact values at large arguments:
Non-integer arguments:
Complex arguments:
Evaluate to high precision:
The precision of the output tracks the precision of the input:
HarmonicNumber threads element-wise over lists and arrays:
Series expansion at any point:
Series expansion at infinity:
HarmonicNumber can be applied to power series:
Evaluate at exact arguments:
Series expansion at any point:
Series expansion at infinity:
 Applications   (4)
The average number of comparisons in Quicksort:
Plot over the complex plane:
Book stacking with the maximal overhang:
Picking the best candidate out of n after x evaluated choices [more info]:
Evaluate for n=100:
Plot as a function of harem size:
Use FullSimplify to simplify expressions containing harmonic numbers:
Expand in simpler functions:
Sums:
Generate from sums and integrals:
Generating function:
Large arguments can give results too large to be computed explicitly:
Machine-number inputs can give high-precision results:
Often results are expressed in PolyGamma instead of HarmonicNumber:
New in 4
 Site Index Choose Language