# mathlibdocumentation

number_theory.bernoulli

# Bernoulli numbers

The Bernoulli numbers are a sequence of numbers that frequently show up in number theory.

For example, they show up in the Taylor series of many trigonometric and hyperbolic functions, and also as (integral multiples of products of powers of π and) special values of the Riemann zeta function. (Note: these facts are not yet available in mathlib)

In this file, we provide the definition, and the basic fact (sum_bernoulli) that $$\sum_{k < n} \binom{n}{k} * B_k = n,$$ where $B_k$ denotes the the $k$-th Bernoulli number.

def bernoulli  :

The Bernoulli numbers: the $n$-th Bernoulli number $B_n$ is defined recursively via $$B_n = \sum_{k < n} \binom{n}{k} * \frac{B_k}{n+1-k}$$

Equations
theorem bernoulli_def' (n : ) :
= 1 - ∑ (k : fin n), ((n.choose k)) * / (n + 1 - k)

theorem bernoulli_def (n : ) :
= 1 - ∑ (k : ) in , ((n.choose k)) * / (n + 1 - k)

@[simp]
theorem bernoulli_zero  :
= 1

@[simp]
theorem bernoulli_one  :
= 1 / 2

@[simp]
theorem bernoulli_two  :
= 1 / 6

@[simp]
theorem bernoulli_three  :
= 0

@[simp]
theorem bernoulli_four  :
= (-1) / 30

@[simp]
theorem sum_bernoulli (n : ) :
∑ (k : ) in , ((n.choose k)) * = n