# Bernoulli numbers and polynomials (bernoulli_b)

The n-th Bernoulli number.

## How to write it

### bernoulli_b(n)

**n**

A whole number. Takes a whole number.

## Examples

- $\displaystyle \operatorname{bernoulli\_b}(4) = -\frac{1}{30}$

  `bernoulli_b(4)`

  In the solver, `bernoulli_b(4)` gives `-1/30`.

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

## Related functions

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

  Carmichael function: the least power that takes every number coprime to n to 1 modulo n.
- [bell_b](https://hilberon.com/library/bell_b)

  The n-th Bell number: how many ways to split n items into groups.
- [catalan_number](https://hilberon.com/library/catalan_number)

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

  Euler's totient: how many whole numbers up to n are coprime to n.
- [chinese_remainder](https://hilberon.com/library/chinese_remainder)

  The number that leaves given remainders on division by given moduli.
- [subfactorial](https://hilberon.com/library/subfactorial)

  Subfactorial: how many ways to reorder n items so none stays in place.

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