# 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

- $\displaystyle \operatorname{harmonic\_number}(4) = \frac{25}{12}$

  `harmonic_number(4)`

  In the solver, `harmonic_number(4)` gives `25/12`.

  [Open in the solver](https://hilberon.com/?q=harmonic_number%284%29)

## Related functions

- [catalan_number](https://hilberon.com/library/catalan_number)

  The n-th Catalan number.
- [integer_exponent](https://hilberon.com/library/integer_exponent)

  The exponent of a prime in a whole number.
- [from_continued_fraction](https://hilberon.com/library/from_continued_fraction)

  The number a continued fraction stands for.
- [integer_partitions](https://hilberon.com/library/integer_partitions)

  All the ways to write a whole number as a sum of positive whole numbers.
- [fibonacci](https://hilberon.com/library/fibonacci)

  The n-th Fibonacci number, with F(1) = F(2) = 1.
- [is_coprime](https://hilberon.com/library/is_coprime)

  Test whether two whole numbers have no common divisor above 1.

---
Source: https://hilberon.com/library/harmonic_number
