Bernoulli numbers #
The Bernoulli numbers are a sequence of rational numbers that frequently show up in number theory.
Mathematical overview #
The Bernoulli numbers
Note however that this result is not yet formalised in Lean.
The Bernoulli numbers can be formally defined using the power series
although that happens to not be the definition in mathlib (this is an implementation detail and need not concern the mathematician).
Note that
Implementation detail #
The Bernoulli numbers are defined using well-founded induction, by the formula
bernoulli'
. The negative Bernoulli numbers are
then defined as bernoulli := (-1)^n * bernoulli'
.
Main theorems #
sum_bernoulli : ∑ k ∈ Finset.range n, (n.choose k : ℚ) * bernoulli k = if n = 1 then 1 else 0
Definitions #
Examples #
The exponential generating function for the Bernoulli numbers bernoulli' n
.
Equations
- bernoulli'PowerSeries A = PowerSeries.mk fun (n : ℕ) => (algebraMap ℚ A) (bernoulli' n / ↑n.factorial)
Odd Bernoulli numbers (greater than 1) are zero.
The Bernoulli numbers are defined to be bernoulli'
with a parity sign.
Equations
- bernoulli n = (-1) ^ n * bernoulli' n
The exponential generating function for the Bernoulli numbers bernoulli n
.
Equations
- bernoulliPowerSeries A = PowerSeries.mk fun (n : ℕ) => (algebraMap ℚ A) (bernoulli n / ↑n.factorial)
Faulhaber's theorem relating the sum of p-th powers to the Bernoulli numbers:
Alternate form of Faulhaber's theorem, relating the sum of p-th powers to the Bernoulli
numbers: sum_range_pow
.