Click or drag to resize

SpecialFunctionsHarmonicNumber(Int32) Method

The harmonic number, Hn, is a truncated sum of the harmonic series.

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
public static double HarmonicNumber(
	int n
)

Parameters

n  Int32
The harmonic number's index.

Return Value

Double
The nth harmonic number.
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionThe integer parameter n must be greater than -1.
Remarks
The harmonic number is
C#
      n
      --
Hn =  >   1 / k
      -- 
     k = 1
The harmonic number is closely related to the digamma function. (Ref. http://mathworld.wolfram.com/HarmonicNumber.html )
See Also