Probabilities.GenHarmonic Method

function GenHarmonic(n: Integer; m: Double): Double;

Generalized harmonic number H(n,m).

#NameDescription
1nupper summation index
2non-negative integer.
3morder (exponent)
4real.

Returns: Double - the generalized harmonic number H(n,m).

Remarks:

The generalized harmonic number is defined by the finite sum

H(n,m) = sum_(k=1)^n1/k^m .

Domain: n integer, m real. Defined behavior: returns the exact finite sum; H(n,1)=H_n (the ordinary harmonic number), H(n,0)=nH(n,0)=n, and for m > 1 the partial sums increase toward zeta(m) from below as n -> inf. For n <= 0 the empty sum is 0.

See Also: Probabilities.Harmonic