Bernoulli Numbers Calculator (B_n and Power Sums)
Bernoulli numbers calculator B_n in exact rational form: recurrence, sequence, Faulhaber power sums, zeta(2n) Euler values and von Staudt-Clausen theorem.
Report a calculation error
Help us improve. Describe what is wrong with the calculation.
Result
| Voce | Valore |
|---|
Show full details
Share result
Disclaimer: this calculation is for informational purposes only. For important decisions, consult a qualified professional.
The Bernoulli numbers
The Bernoulli numbers B_n, studied by Jakob Bernoulli in the posthumous Ars Conjectandi (1713) and independently by Seki Takakazu in Japan in 1712, form a sequence of rational numbers appearing in mathematical analysis, number theory, topology and theoretical physics. They are defined by the generating series x/(e^x - 1) = Sigma_{n>=0} B_n * x^n / n! and constitute one of the most important sequences in mathematics.
Initial values
B_0 = 1, B_1 = -1/2, B_2 = 1/6, B_3 = 0, B_4 = -1/30, B_5 = 0, B_6 = 1/42, B_7 = 0, B_8 = -1/30, B_9 = 0, B_10 = 5/66, B_12 = -691/2730 (first "large" numerator). All B_n with odd n >= 3 are zero. Modern convention sets B_1 = -1/2; an alternate convention uses B_1 = +1/2.
Recursive formula
The identity Sigma_{j=0}^{n} C(n+1, j) * B_j = 0 for n >= 1 gives the recurrence:
B_n = -(1/(n+1)) * Sigma_{j=0}^{n-1} C(n+1, j) * B_j
With B_0 = 1. The calculator uses this recurrence with exact rational arithmetic (BigInt) to avoid precision loss. At n=60 the numerator already has 23 decimal digits.
Faulhaber's formula for power sums
The sum of the first m k-th powers has polynomial closed form in m:
Sigma_{i=1}^{m} i^k = (1/(k+1)) * Sigma_{j=0}^{k} C(k+1, j) * B_j * m^(k+1-j)
Examples: Sigma i = m(m+1)/2, Sigma i^2 = m(m+1)(2m+1)/6, Sigma i^3 = [m(m+1)/2]^2. The calculator produces the exact BigInt value, avoiding overflow.
Von Staudt-Clausen theorem
The von Staudt-Clausen theorem (1840) characterizes Bernoulli denominators:
B_{2n} + Sigma_{(p-1)|2n, p prime} 1/p is an integer.
So denominator of B_{2n} is the product of primes p such that (p-1) divides 2n. E.g. B_10 has denominator 2*3*11 = 66 (p=2,3,11 with p-1=1,2,10 dividing 10). Fundamental for p-adic theory and Kummer's irregular numbers.
Euler's identity for zeta(2n)
Euler (1735) proved the remarkable formula:
zeta(2n) = Sigma_{k=1}^{infinity} 1/k^(2n) = (-1)^(n+1) * (2pi)^(2n) * B_{2n} / (2 * (2n)!)
So zeta(2) = pi^2/6 (Basel problem), zeta(4) = pi^4/90, zeta(6) = pi^6/945. Values zeta(2n+1) for n >= 1 have no known closed form; zeta(3) (Apery's constant) was proven irrational by Roger Apery in 1978.
The four modes
- Single B_n: computes the exact rational number p/q.
- Sequence B_0..B_n: full list of the first n+1 Bernoulli numbers.
- Power sum: applies Faulhaber's formula for 1^k + 2^k + ... + m^k.
- zeta(2n) values: produces closed-form expression in pi^(2n) and B_{2n}.
Applications
- Number theory: Kummer's regular primes, Fermat's last theorem for regular exponents.
- Differential topology: Atiyah-Singer theorem, Pontryagin numbers, Todd index.
- Quantum physics: regularized zero-point energy, Riemann zeta function.
- Numerical analysis: Euler-Maclaurin summation for quadrature.
- Combinatorics: bipartite graph enumeration, Stirling numbers of second kind.
- Analytic number theory: explicit formula for Hurwitz zeta function.
History of the Bernoulli numbers
The numbers are named after Jacob Bernoulli, who introduced them in the posthumous work Ars Conjectandi of 1713 while studying sums of powers of integers. Almost simultaneously, in Japan, the mathematician Seki Takakazu discovered them independently, a rare example of parallel discovery between East and West. But their most famous moment in history came in 1843: Ada Lovelace, annotating Charles Babbage's Analytical Engine, wrote a detailed algorithm to compute the Bernoulli numbers step by step. That algorithm is considered the first computer program ever published, and the Bernoulli numbers were thus the first mathematical object whose automatic computation was designed, a century before electronic computers.
Irregular primes and Fermat's Last Theorem
The Bernoulli numbers have a deep connection with one of the most famous problems in mathematics. In the 19th century Ernst Kummer defined a prime p as "regular" if it divides the numerator of none of the Bernoulli numbers B₂, B₄, …, B_{p−3}, and "irregular" otherwise. Kummer proved that Fermat's Last Theorem holds for all regular prime exponents, a huge step forward when the theorem was still an open conjecture. Irregular primes are relatively rare (the smallest is 37) but infinite, and their distribution is still studied. This unexpected link between power sums, arithmetic of rationals and number theory illustrates the surprising depth of the Bernoulli numbers.
The Euler-Maclaurin formula
One of the most powerful uses of the Bernoulli numbers is the Euler-Maclaurin formula, which links a discrete sum to a continuous integral through a series of correction terms weighted by the Bernoulli numbers. It allows sums to be approximated by integrals (and vice versa) with very high precision, and it underlies numerical methods for evaluating slowly converging series, asymptotic analysis and the famous Stirling approximation for the factorial. The Bernoulli numbers also appear in the series expansions of the tangent and cotangent functions and in the generating function x/(eˣ−1), from which they can be compactly defined. They are thus a central tool of mathematical analysis and scientific computing.
Updated July 2026
Comments (0)
Login to leave a comment.
No comments yet. Be the first!