Harmonic number (harmonic_number)
The n-th harmonic number: 1 + 1/2 + ... + 1/n.
How to write it
harmonic_number(n)
- n
- A whole number. Takes a whole number.
Examples
harmonic_number(4)In the solver,
Open in the solverharmonic_number(4)gives25/12.
Related functions
- catalan_number
The n-th Catalan number.
- integer_exponent
The exponent of a prime in a whole number.
- from_continued_fraction
The number a continued fraction stands for.
- integer_partitions
All the ways to write a whole number as a sum of positive whole numbers.
- fibonacci
The n-th Fibonacci number, with F(1) = F(2) = 1.
- is_coprime
Test whether two whole numbers have no common divisor above 1.