Bernoulli Number

DOWNLOAD Mathematica Notebook EXPLORE THIS TOPIC IN the MathWorld Classroom

The Bernoulli numbers B_n are a sequence of signed rational numbers that can be defined by the exponential generating function

 x/(e^x-1)=sum_(n=0)^infty(B_nx^n)/(n!).
(1)

These numbers arise in the series expansions of trigonometric functions, and are extremely important in number theory and analysis.

There are actually two definitions for the Bernoulli numbers. To distinguish them, the Bernoulli numbers as defined in modern usage (National Institute of Standards and Technology convention) are written B_n, while the Bernoulli numbers encountered in older literature are written B_n^* (Gradshteyn and Ryzhik 2000). In each case, the Bernoulli numbers are a special case of the Bernoulli polynomials B_n(x) or B_n^*(x) with B_n=B_n(0) and B_n^*=B_n^*(0).

The Bernoulli number and polynomial should not be confused with the Bell numbers and Bell polynomial, which are also commonly denoted B_n and B_n(x), respectively.

Bernoulli numbers defined by the modern definition are denoted B_n and sometimes called "even-index" Bernoulli numbers. These are the Bernoulli numbers returned, by example, by the Wolfram Language function BernoulliB[n].

The Bernoulli number B_n can be defined by the contour integral

 B_n=(n!)/(2pii)∮z/(e^z-1)(dz)/(z^(n+1)),
(2)

where the contour encloses the origin, has radius less than 2pi (to avoid the poles at +/-2pii), and is traversed in a counterclockwise direction (Arfken 1985, p. 413).

The first few Bernoulli numbers B_n are

B_0=1
(3)
B_1=-1/2
(4)
B_2=1/6
(5)
B_4=-1/(30)
(6)
B_6=1/(42)
(7)
B_8=-1/(30)
(8)
B_(10)=5/(66)
(9)
B_(12)=-(691)/(2730)
(10)
B_(14)=7/6
(11)
B_(16)=-(3617)/(510)
(12)
B_(18)=(43867)/(798)
(13)
B_(20)=-(174611)/(330)
(14)
B_(22)=(854513)/(138)
(15)

(OEIS A000367 and A002445), with

 B_(2n+1)=0
(16)

for n=1, 2, ....

BernoulliNumberDigits

The numbers of digits in the numerator of B_n for the n=2, 4, ... are 1, 1, 1, 1, 1, 3, 1, 4, 5, 6, 6, 9, 7, 11, ... (OEIS A068399), while the numbers of digits in the corresponding denominators are 1, 2, 2, 2, 2, 4, 1, 3, 3, 3, 3, 4, 1, 3, 5, 3, ... (OEIS A092904). Both are plotted above.

The denominator of B_(2n) is given by

 denom(B_(2n))=product_((p-1)|(2n))p,
(17)

where the product is taken over the primes p (Ex. 6.54 in Graham et al. 1994), a result which is related to the von Staudt-Clausen theorem.

The number of digits in the numerators of B_(10^n) for n=0, 1, ... are 1, 1, 83, 1779, 27691, 376772, 4767554, 57675292, 676752609, 7767525702, ... (OEIS A103233), while the corresponding numbers of digits in the denominator are 1, 2, 5, 9, 13, 16, 24, ... (OEIS A114471). The values of the denominators of B_(10^n) for n=0, 1, ... are 66, 33330, 342999030, 2338224387510, 9355235774427510, ... (OEIS A139822).

denom(B_n)=n for 1806, but for no other n (Kellner 2005).

The running maxima of denominators are 1, 6, 30, 42, 66, 2730, 14322, 1919190, ... (OEIS A100194), which occur for n=2, 4, 6, 8, 12, 14, 32, 38, ... (OEIS A100195).

The fraction of B_n with even n that have denominator 6 is strictly positive (Jensen 1915), with similar results for other denominators (Erdős and Wagstaff 1980, Moreno and Wagstaff 2005).

Interestingly, a higher proportion of Bernoulli denominators equal 6 than any other value (Sunseri 1980), and the fraction of even Bernoulli numbers with denominator 6 is close to 1/6 (Erdős and Wagstaff 1980). S. Plouffe (pers. comm., Feb. 12, 2007) computed the fraction of even Bernoulli numbers with denominator 6 up to B_(5285000) and found it to be 0.1526... and still slowly decreasing.

BernoulliDenominatorHistogram

The numbers of Bernoulli numbers less than or equal to 1, 10, 10^2, ... having denominator 6 are 0, 1, 10, 87, 834, ... (OEIS A114648), which approaches the decimal expansion of 1/12=0.08333.... The above histogram shows the fraction of denominators having given denominators for index up to 10^4. Ranked in order of frequency, the first few denominators appear to be 6, 30, 42, 66, 510, ... (OEIS A114649).

The only known Bernoulli numbers B_n having prime numerators occur for n=10, 12, 14, 16, 18, 36, and 42 (OEIS A092132), corresponding to 5, -691, 7, -3617, 43867, -26315271553053477373, and 1520097643918070802691 (OEIS A092133), with no other primes for n<=101000 (E. W. Weisstein, Feb. 27, 2007). Wagstaff maintains a page of factorizations of Bernoulli number numerators.

The following table summarizes record computations of the nth Bernoulli number B_n, including giving the number of digits in the numerator.

ndigits in numeratordenominatordatereference
20000081373414977732474858443510Fee and Plouffe
50000022332735847115911374938025102002Plouffe (2002)
1×10^64767554936123257411127577818510Dec. 16, 2002Kellner
2×10^6101371479601480183016524970884020224910Feb. 10, 2003Kellner
5×10^627332507936123257411127577818510Oct. 8, 2005O. Pavlyk (pers. comm.)
1×10^7576752929601480183016524970884020224910Feb. 2008O. Pavlyk (2008)
1×10^8676752609394815332706046542049668428841497001870Oct. 2008D. Harvey (2008)

The denominator of B_(2k) (mod 1) is given by the von Staudt-Clausen theorem, which also implies that the denominator of B_(2k) is squarefree (Hardy and Wright 1979). Another curious property is that the fractional part of B_n has a decimal expansion period that divides n, and there is a single digit before that period (Conway 1996). In particular, the periods of frac(B_n) for n=2, 4, ... are 1, 1, 6, 1, 2, 6, 1, 16, 18, 2, 22, ... (OEIS A112828), and the corresponding values of n/frac(B_n) are 2, 4, 1, 8, 5, 2, 14, 1, 1, 10, ... (OEIS A112829).

Consider the generating function

 F(x,t)=sum_(n=0)^infty(B_n(x)t^n)/(n!),
(18)

which converges uniformly for |t|<2pi and all x (Castellanos 1988). Taking the partial derivative gives

(partialF(x,t))/(partialx)=sum_(n=0)^(infty)(B_(n-1)(x)t^n)/((n-1)!)
(19)
=tsum_(n=0)^(infty)(B_n(x)t^n)/(n!)
(20)
=tF(x,t).
(21)

The solution to this differential equation can be found using separation of variables as

 F(x,t)=T(t)e^(xt),
(22)

so integrating gives

int_0^1F(x,t)dx=T(t)int_0^1e^(xt)dx
(23)
=T(t)(e^t-1)/t.
(24)

But integrating (24) explicitly gives

int_0^1F(x,t)dx=sum_(n=0)^(infty)(t^n)/(n!)int_0^1B_n(x)dx
(25)
=1+sum_(n=1)^(infty)(t^n)/(n!)int_0^1B_n(x)dx
(26)
=1,
(27)

so

 T(t)(e^t-1)/t=1.
(28)

Solving for T(t) and plugging back into (◇) then gives

 (te^(xt))/(e^t-1)=sum_(n=0)^infty(B_n(x)t^n)/(n!)
(29)

(Castellanos 1988). Setting x=0 and adding t/2 to both sides then gives

 1/2tcoth(1/2t)=sum_(n=0)^infty(B_(2n)t^(2n))/((2n)!).
(30)

Letting t=2ix then gives

 xcotx=sum_(n=0)^infty(-1)^nB_(2n)((2x)^(2n))/((2n)!)
(31)

for x in [-pi,pi].

The Bernoulli numbers may also be calculated from

 B_n=lim_(x->0)(d^n)/(dx^n)x/(e^x-1).
(32)

The Bernoulli numbers are given by the double sum

 B_n=sum_(k=0)^n1/(k+1)sum_(r=0)^k(-1)^r(k; r)r^n,
(33)

where (n; k) is a binomial coefficient. They also satisfy the sum

 sum_(k=0)^(n-1)(n; k)B_k=0,
(34)

which can be solved for B_(n-1) to give a recurrence relation for computing B_n. By adding B_n to both sides of (34), it can be written simply as

 (B+1)^([n])=B^([n]),
(35)

where the notation B^([k]) means the quantity in question is raised to the appropriate power k and all terms of the form B^m are replaced with the corresponding Bernoulli numbers B_m.

as well as the interesting sums

sum_(k=0)^(n)(6n+3; 6k)B_(6k)=2n+1
(36)
sum_(k=0)^(n)(6n+5; 6k+2)B_(6k+2)=1/3(6n+5)
(37)
sum_(k=1)^(n)(6n+1; 6k-2)B_(6k-2)=-1/6(6n+1)
(38)

(Lehmer 1935, Carlitz 1968, Štofka 2014), as well as the nice sum identity

 sum_(i=0)^n((1-2^(1-i))(1-2^(i-n+1))B_(n-i)B_i)/((n-i)!i!)=((1-n)B_n)/(n!)
(39)

(Gosper).

An asymptotic series for the even Bernoulli numbers is

 B_(2n)∼(-1)^(n-1)4sqrt(pin)(n/(pie))^(2n).
(40)

Bernoulli numbers appear in expressions of the form sum_(k=1)^(n)k^p, where p=1, 2, .... Bernoulli numbers also appear in the series expansions of functions involving tanx, cotx, cscx, ln|sinx|, ln|cosx|, ln|tanx|, tanhx, cothx, and cschx.

An analytic solution exists for even orders,

B_(2n)=((-1)^(n-1)2(2n)!)/((2pi)^(2n))sum_(p=1)^(infty)p^(-2n)
(41)
=((-1)^(n-1)2(2n)!)/((2pi)^(2n))zeta(2n)
(42)

for n=1, 2, ..., where zeta(2n) is the Riemann zeta function. Another intimate connection with the Riemann zeta function is provided by the identity

 B_n=(-1)^(n+1)nzeta(1-n).
(43)

An integral in terms of the Euler polynomial is given by

 B_n=(n(n-1))/(4(2^n-1))int_0^1E_(n-2)(x)dx,
(44)

where E_n(x) is an Euler polynomial (J. Crepps, pers. comm., Apr. 2002).

Bernoulli first used the Bernoulli numbers while computing sum_(k=1)^(n)k^p. He used the property of the figurate number triangle that

 sum_(i=0)^na_(ij)=((n+1)a_(nj))/(j+1),
(45)

along with a form for a_(nj) which he derived inductively to compute the sums up to n=10 (Boyer 1968, p. 85). For p in Z>0, the sum is given by

 sum_(k=1)^nk^p=((B+n+1)^([p+1])-B^([p+1]))/(p+1),
(46)

where again the notation B^([k]) means the quantity in question is raised to the appropriate power k and all terms of the form B^m are replaced with the corresponding Bernoulli numbers B_m. Note that it is common (e.g., Carlitz 1965) to simply write (B+a)^n with the understanding that after expansion, B^k is replaced by B_k.

Written explicitly in terms of a sum of powers,

sum_(k=1)^(n)k^p=n^p+1/(p+1)sum_(k=0)^(p)(p+1; k)B_kn^(p-k+1)
(47)
=1/(p+1)sum_(k=1)^(p+1)(p+1; k)(-1)^(p-k+1)B_(p-k+1)n^k
(48)
=sum_(k=1)^(p+1)b_(pk)n^k,
(49)

where

 b_(pk)=((-1)^(p-k+1)B_(p-k+1))/(p+1)(p+1; k).
(50)

Taking n=1 gives Bernoulli's observation that the coefficients of the terms b_(pk) sum to 1,

 sum_(k=1)^(p+1)b_(pk)=1.
(51)

Ramanujan gave a number of curious infinite sum identities involving Bernoulli numbers (Berndt 1994).

BernoulliNumberPlouffeInequality

Plouffe (pers. comm., Jun. 21, 2004) conjectured that the fractional parts of positive Bernoulli numbers of the form B_(4n+2) satisfy either frac(B_(4n+2))<1/6 or frac(B_(4n+2))>2/3. However, there are many counterexamples, the first few of which occur for n=2072070 (found by Plouffe also on Jun. 21, 2004), 6216210, 8128890, 10360350, 13548150, ... (OEIS A155125). Interestingly, all of these are numbers having a large number of factors in their primes factorizations, as summarized in the following table. The indices of these numbers having incrementally smallest value of frac(B_n) are given by 2072070, 6216210, 10360350, 18648630, 31081050, 35225190, 93243150, ... (OEIS A155126), which appear to tend to occur at positions in the original list that are powers of 2 (1, 2, 4, 8, 16, 18, 64, ...).

nfactorization of nfrac(B_n)
20720702·3^2·5·7·11·13·230.6664435068
62162102^1·3^3·5^1·7^1·11^1·13^1·23^10.6588649656
81288902^1·3^3·5^1·7^1·11^1·17^1·23^10.6648723198
103603502^1·3^2·5^2·7^1·11^1·13^1·23^10.6564013890

The older definition of the Bernoulli numbers, no longer in widespread use, defines B_n^* using the equations

x/(e^x-1)+x/2-1=sum_(n=1)^(infty)((-1)^(n-1)B_n^*x^(2n))/((2n)!)
(52)
=(B_1^*x^2)/(2!)-(B_2^*x^4)/(4!)+(B_3^*x^6)/(6!)+...
(53)

or

1-x/2cot(x/2)=sum_(n=1)^(infty)(B_n^*x^(2n))/((2n)!)
(54)
=(B_1^*x^2)/(2!)+(B_2^*x^4)/(4!)+(B_3^*x^6)/(6!)+...
(55)

for |x|<2pi (Whittaker and Watson 1990, p. 125). The B_n^* Bernoulli numbers may be calculated from the integral

 B_n^*=4nint_0^infty(t^(2n-1)dt)/(e^(2pit)-1),
(56)

and analytically from

 B_n^*=(2(2n)!)/((2pi)^(2n))sum_(p=1)^inftyp^(-2n)=(2(2n)!)/((2pi)^(2n))zeta(2n)
(57)

for n=1, 2, ..., where zeta(z) is the Riemann zeta function.

The Bernoulli numbers B_n are a superset of the archaic ones B_n^* since

 B_n={1   for n=0; -1/2   for n=1; (-1)^((n/2)-1)B_(n/2)^*   for n even; 0   for n odd.
(58)

The first few Bernoulli numbers B_n^* are

B_1^*=1/6
(59)
B_2^*=1/(30)
(60)
B_3^*=1/(42)
(61)
B_4^*=1/(30)
(62)
B_5^*=5/(66)
(63)
B_6^*=(691)/(2730)
(64)
B_7^*=7/6
(65)
B_8^*=(3617)/(510)
(66)
B_9^*=(43867)/(798)
(67)
B_(10)^*=(174611)/(330)
(68)
B_(11)^*=(854513)/(138).
(69)

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.