# Bernoulli number

The [Bernoulli numbers](https://www.edgepedia.org/bernoulli-numbers) are a sequence of rational numbers \( B_0, B_1, B_2, \ldots \) defined as the coefficients in the exponential generating function \( \frac{t}{\mathrm{e}^{t}-1} = \sum_{n=0}^{\infty} B_n \frac{t^n}{n!} \). They were introduced by [Jacob Bernoulli](https://www.edgepedia.org/jacob-bernoulli) in connection with sums of powers of integers and now appear throughout analysis and number theory, in the Euler–Maclaurin summation formula, in the values of the [Riemann zeta function](https://www.edgepedia.org/riemann-zeta-function) at even integers, and in the arithmetic of cyclotomic fields.<sup>[1](http://dlmf.nist.gov/24.2)</sup><sup> • </sup><sup>[2](https://dlmf.nist.gov/24.17)</sup>

| Key fact | Detail |
|---|---|
| Generating function | \( \frac{t}{\mathrm{e}^{t}-1} = \sum_{n=0}^{\infty} B_n \frac{t^n}{n!} \)<sup>[1](http://dlmf.nist.gov/24.2)</sup> |
| First values | \( B_0=1 \), \( B_1=-\tfrac{1}{2} \), \( B_2=\tfrac{1}{6} \), \( B_4=-\tfrac{1}{30} \), \( B_6=\tfrac{1}{42} \), \( B_8=-\tfrac{1}{30} \), \( B_{10}=\tfrac{5}{66} \), \( B_{12}=-\tfrac{691}{2730} \)<sup>[1](http://dlmf.nist.gov/24.2)</sup> |
| Odd terms vanish | \( B_{2n+1}=0 \) for \( n \ge 1 \)<sup>[1](http://dlmf.nist.gov/24.2)</sup> |
| Denominators | By the von Staudt–Clausen theorem, the denominator of \( B_{2n} \) is the product of all primes \( p \) with \( p-1 \) dividing \( 2n \)<sup>[3](https://dlmf.nist.gov/24.10)</sup> |
| Zeta values | \( \zeta(2n) = \frac{(2\pi)^{2n}}{2(2n)!}\left|B_{2n}\right| \) and \( \zeta(-n) = -\frac{B_{n+1}}{n+1} \)<sup>[4](http://dlmf.nist.gov/25.6)</sup> |
| Growth | \( (-1)^{n+1} B_{2n} \sim 4\sqrt{\pi n}\left(\frac{n}{\pi \mathrm{e}}\right)^{2n} \), so the numbers grow superexponentially<sup>[5](https://dlmf.nist.gov/24.11)</sup> |
| Computation record | David Harvey's 2008 multimodular algorithm computed \( B_{10^8} \), a record that a 2025 survey still credits as standing<sup>[6](https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ITP.2025.35)</sup> |

## Definition and first values

The generating function \( \frac{t}{\mathrm{e}^{t}-1} \) is expanded as a power series about \( t=0 \), and its coefficients, divided by factorials, are the Bernoulli numbers. Expanding gives \( B_0 = 1 \), \( B_1 = -\tfrac{1}{2} \), \( B_2 = \tfrac{1}{6} \), \( B_3 = 0 \), \( B_4 = -\tfrac{1}{30} \), and so on. All odd-indexed Bernoulli numbers beyond \( B_1 \) vanish: \( B_{2n+1} = 0 \) for \( n \ge 1 \).<sup>[1](http://dlmf.nist.gov/24.2)</sup> Some authors use the opposite sign convention \( B_1 = +\tfrac{1}{2} \), which changes only that one value.<sup>[7](https://www.ams.org/bull/2007-44-04/S0273-0979-07-01175-5/S0273-0979-07-01175-5.pdf)</sup>

The numbers are the constant terms of the Bernoulli polynomials, defined by \( B_n(x) = \sum_{k=0}^{n} \binom{n}{k} B_k x^{n-k} \), so that \( B_n = B_n(0) \). For example \( B_1(x) = x - \tfrac{1}{2} \) and \( B_2(x) = x^2 - x + \tfrac{1}{6} \).<sup>[1](http://dlmf.nist.gov/24.2)</sup> The polynomials, not just the numbers, carry many of the applications: they appear in statistical physics, in discussions of Casimir forces, and in studies of the quark-gluon plasma.<sup>[8](http://dlmf.nist.gov/24.18)</sup>

## Sums of powers and early history

The original problem behind the sequence was evaluating \( 1^k + 2^k + \cdots + n^k \). Johann [Faulhaber](https://www.edgepedia.org/faulhaber), a Rechenmeister of Nuremberg, published formulas for such power sums in *Academia Algebrae* (1631), including closed expressions for sums of odd powers up to the seventeenth; he did not discover the Bernoulli numbers, and a general closed formula for the power sum in terms of \( B_{p+1-i} \) came later.<sup>[9](https://mathworld.wolfram.com/FaulhabersFormula.html)</sup>

Jacob Bernoulli (1655–1705), professor of mathematics at Basel from 1687, treated the exponential series in his *Ars Conjectandi*, where the numbers that now carry his name appear. The book was published in Basel in 1713, eight years after his death, and Bernoulli refers to Faulhaber's work in it.<sup>[10](https://mathshistory.st-andrews.ac.uk//Biographies/Faulhaber/)</sup><sup> • </sup><sup>[11](https://mathshistory.st-andrews.ac.uk/Biographies//Bernoulli_Jacob/)</sup> Bernoulli himself computed the numbers only up to \( B_{10} = 5/66 \).<sup>[6](https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ITP.2025.35)</sup> The name "Bernoullian numbers" was introduced by [Leonhard Euler](https://www.edgepedia.org/leonhard-euler) in the title of a 1769 paper, and the shorter modern form is attributed to Abraham de Moivre.<sup>[12](https://mathshistory.st-andrews.ac.uk//Miller/mathword/b/)</sup><sup> • </sup><sup>[10](https://mathshistory.st-andrews.ac.uk//Biographies/Faulhaber/)</sup> Euler computed Bernoulli numbers and polynomials in his work on summation in the 1730s and applied them through what is now called the [Euler–Maclaurin formula](https://www.edgepedia.org/euler-maclaurin-formula).<sup>[13](https://www.ams.org/bull/2013-50-04/S0273-0979-2013-01423-X/S0273-0979-2013-01423-X.pdf)</sup>

## Sums, the Euler–Maclaurin formula, and the zeta function

The Euler–Maclaurin summation formula expresses a finite sum as an integral plus correction terms built from Bernoulli numbers:

\[ \sum_{j=a}^{n} f(j) = \int_{a}^{n} f(x)\,dx + \tfrac{1}{2}f(a) + \tfrac{1}{2}f(n) + \sum_{s=1}^{m-1} \frac{B_{2s}}{(2s)!}\bigl(f^{(2s-1)}(n)-f^{(2s-1)}(a)\bigr) + \cdots \]

This is an asymptotic expansion, and it is one of the most common practical appearances of the sequence.<sup>[14](http://dlmf.nist.gov/2.10)</sup>

The connection to the Riemann zeta function is exact at integers. For positive even arguments,

\[ \zeta(2n) = \frac{(2\pi)^{2n}}{2(2n)!}\left|B_{2n}\right|, \]

so \( \zeta(2) = \pi^2/6 \), \( \zeta(4) = \pi^4/90 \), and \( \zeta(6) = \pi^6/945 \). At negative integers, \( \zeta(-n) = -B_{n+1}/(n+1) \), which in particular gives \( \zeta(-2n) = 0 \) and reproduces \( \zeta(0) = -1/2 \).<sup>[4](http://dlmf.nist.gov/25.6)</sup> The even zeta values are therefore rational multiples of powers of \( \pi \), with the Bernoulli numbers supplying the rational factor.

## Arithmetic properties

**Von Staudt–Clausen theorem.** For every \( n \ge 1 \),

\[ B_{2n} + \sum_{(p-1)\mid 2n} \frac{1}{p} = \text{integer}, \]

where the sum runs over primes \( p \) such that \( p-1 \) divides \( 2n \). Consequently the denominator of \( B_{2n} \) in lowest terms is exactly the product of those primes, a squarefree product determined by divisibility alone.<sup>[3](https://dlmf.nist.gov/24.10)</sup> For example \( B_{12} = -691/2730 \) has denominator \( 2 \cdot 3 \cdot 5 \cdot 7 \cdot 13 \), the primes \( p \) with \( p-1 \mid 12 \).<sup>[1](http://dlmf.nist.gov/24.2)</sup>

**Kummer congruences and irregular primes.** Kummer's congruence relates Bernoulli numbers whose indices are congruent modulo powers of a prime: for a prime \( p \) and even \( k, k' \) with \( k \equiv k' \pmod{\varphi(p^e)} \) and suitable size conditions, \( \frac{B_k}{k} \equiv \frac{B_{k'}}{k'} \pmod{p^e} \).<sup>[15](https://devel.isa-afp.org/entries/Kummer_Congruence.html)</sup> A prime \( p \) is called irregular if it divides the numerator of some \( B_{2n} \) with \( 2n \le p-3 \). Kummer used these ideas to prove [Fermat's Last Theorem](https://www.edgepedia.org/fermats-last-theorem) for a class of exponents (the regular primes), and the irregular prime \( p = 157 \) is the least prime with irregularity index 2, dividing both \( B_{62} \) and \( B_{110} \).<sup>[16](https://www.bernoulli.org/)</sup> The arithmetic of Bernoulli numbers also enters the theory of cyclotomic fields and \( p \)-adic analysis.<sup>[2](https://dlmf.nist.gov/24.17)</sup>

## Computation

Because \( |B_{2n}| \) grows roughly like \( 4\sqrt{\pi n}(n/(\pi \mathrm{e}))^{2n} \), the numerators become enormous quickly, and efficient computation is a genuine problem.<sup>[5](https://dlmf.nist.gov/24.11)</sup> Recurrence relations from the generating function suffice for small indices, and faster methods use tangent-number recurrences or zeta-function series.<sup>[17](https://dlmf.nist.gov/24.19)</sup>

In 2008 [David Harvey](https://www.edgepedia.org/david-harvey), then a researcher in computational number theory, described a multimodular algorithm that computes \( B_k \) modulo many small primes \( p \) and reconstructs the rational number with the Chinese Remainder Theorem, in time \( O(k^2 \log^{2+o(1)} k) \). A parallel implementation computed \( B_{10^8} \), a record that a 2025 survey still credits as standing.<sup>[18](https://arxiv.org/abs/0807.1347)</sup><sup> • </sup><sup>[6](https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ITP.2025.35)</sup> Eberl and Lammich have since given a machine-verified LLVM implementation of Harvey's algorithm with performance comparable to the original C++ code.<sup>[6](https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ITP.2025.35)</sup>

## The first computer program

In 1843 [Ada Lovelace](https://www.edgepedia.org/ada-lovelace) translated Luigi Menabrea's French description of [Charles Babbage](https://www.edgepedia.org/charles-babbage)'s Analytical Engine and appended extensive notes, including Note G, a step-by-step description of how punch cards could drive the engine to compute a sequence of Bernoulli numbers. This table is widely described as the first published computer program, though historians note definitional problems with that label; a 2023 study by Thomas J. Misa affirms that Lovelace created an algorithm for the Bernoulli numbers while crediting both her and Babbage with contributions to the Notes.<sup>[19](https://www.mpg.de/female-pioneers-of-science/Ada-Lovelace)</sup><sup> • </sup><sup>[20](https://arxiv.org/abs/2301.02919)</sup> The choice was apt for a demonstration: the Bernoulli numbers recur throughout mathematics, and computing them exercises looping and conditional operations of the kind a general-purpose machine would need.<sup>[21](https://www.hsm.ox.ac.uk/imagining-ai)</sup>

## References

1. [DLMF §24.2: Definitions and Generating Functions, NIST Digital Library of Mathematical Functions](http://dlmf.nist.gov/24.2)
2. [DLMF §24.17: Mathematical Applications, NIST DLMF](https://dlmf.nist.gov/24.17)
3. [DLMF §24.10: Arithmetic Properties, NIST DLMF](https://dlmf.nist.gov/24.10)
4. [DLMF §25.6: Integer Arguments (Riemann Zeta Function), NIST DLMF](http://dlmf.nist.gov/25.6)
5. [DLMF §24.11: Asymptotic Approximations, NIST DLMF](https://dlmf.nist.gov/24.11)
6. [Manuel Eberl and Peter Lammich (2025). Verifying an Efficient Algorithm for Computing Bernoulli Numbers. ITP 2025, LIPIcs vol. 352.](https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ITP.2025.35)
7. [Euler and His Work on Infinite Series, Bulletin of the American Mathematical Society (2007)](https://www.ams.org/bull/2007-44-04/S0273-0979-07-01175-5/S0273-0979-07-01175-5.pdf)
8. [DLMF §24.18: Physical Applications, NIST DLMF](http://dlmf.nist.gov/24.18)
9. [Faulhaber's Formula, Wolfram MathWorld](https://mathworld.wolfram.com/FaulhabersFormula.html)
10. [Johann Faulhaber (1580–1635), MacTutor History of Mathematics](https://mathshistory.st-andrews.ac.uk//Biographies/Faulhaber/)
11. [Jacob Bernoulli (1655–1705), MacTutor History of Mathematics](https://mathshistory.st-andrews.ac.uk/Biographies//Bernoulli_Jacob/)
12. [Earliest Known Uses of Some of the Words of Mathematics (B), MacTutor](https://mathshistory.st-andrews.ac.uk//Miller/mathword/b/)
13. [bulletin (new series) of the](https://www.ams.org/bull/2013-50-04/S0273-0979-2013-01423-X/S0273-0979-2013-01423-X.pdf)
14. [DLMF §2.10: Sums and Sequences, NIST DLMF](http://dlmf.nist.gov/2.10)
15. [Kummer's Congruence, Archive of Formal Proofs](https://devel.isa-afp.org/entries/Kummer_Congruence.html)
16. [The Bernoulli Number Page](https://www.bernoulli.org/)
17. [DLMF §24.19: Methods of Computation, NIST DLMF](https://dlmf.nist.gov/24.19)
18. [David Harvey (2008). A multimodular algorithm for computing Bernoulli numbers. arXiv:0807.1347.](https://arxiv.org/abs/0807.1347)
19. [Ada Lovelace and the first computer programme in the world, Max Planck Society](https://www.mpg.de/female-pioneers-of-science/Ada-Lovelace)
20. [Thomas J. Misa (2023). Charles Babbage, Ada Lovelace, and the Bernoulli Numbers. arXiv:2301.02919.](https://arxiv.org/abs/2301.02919)
21. [Imagining AI: Babbage & Lovelace, History of Science Museum, Oxford](https://www.hsm.ox.ac.uk/imagining-ai)

---
*Topic: Encyclopedia › Physical world and mathematics › Mathematics and statistics › Numbers and algebra › Arithmetic and number systems › Integer sequences and partitions › Integer sequences*

*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026; Oct 25, 2026 · Last review: Oct 15, 2026*

*Copyright 2026 EdgeChat AI, a subsidiary of Biostate AI.*

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license
