# generalized_harmonic_numbers¶

generalized_harmonic_numbers(n, p=-1.0)[source]

Calculate the generalized harmonic numbers from 1 to n (both inclusive).

$H_p(n) = \sum \limits_{i=1}^{n} i^{-p}$
Parameters:
Return type:

ndarray

Returns:

shape: (n,) the first $$n$$ generalized harmonic numbers