In Europe, they were first studied by Jakob Bernoulli, after whom they were named by Abraham de Moivre. In Japan, perhaps earlier, they were independently discovered by Seki Takakazu. They appear in the Taylor series expansions of the tangent and hyperbolic tangent functions, in the Euler–Maclaurin formula, and in expressions for certain values of the Riemann zeta function.
In note G of Ada Byron's notes on the analytical engine from 1842, there is an algorithm for computergenerated Bernoulli numbers. This distinguishes the Bernoulli numbers as being the subject of the first ever published computer program.
for various fixed values of n. The closed forms are always polynomials in m of degree n + 1. The coefficients of these polynomials are closely related to the Bernoulli numbers, in connection with Faulhaber's formula:
For example, taking n to be 1,
for all values of x of absolute value less than 2π (the radius of convergence of this power series).
These definitions can be shown to be equivalent using mathematical induction. The initial condition $B\_0\; =\; 1$ is immediate from L'Hôpital's rule. To obtain the recurrence, multiply both sides of the equation by $e^x1$. Then, using the Taylor series for the exponential function,
By expanding this as a Cauchy product and rearranging slightly, one obtains
It is clear from this last equality that the coefficients in this power series satisfy the same recurrence as the Bernoulli numbers.
One may also write
where B_{n + 1}(m) is the (n + 1)thdegree Bernoulli polynomial.
Bernoulli numbers may be calculated by using the following recursive formula:
for m > 0, and B_{0} = 1.
An alternative convention for the Bernoulli numbers is to set B_{1} = 1/2 rather than −1/2. If this convention is used, then all the Bernoulli numbers may be calculated by a different recursive formula without further qualification:
Dividing both sides by m + 1 then gives a form suggestive of the connection with the Riemann zeta function if the j=0 case is understood as a limit to deal with the pole at ζ(1):
The terms of this sum are the coefficients given by Faulhaber's formula for the closed form of $sum\_\{x=1\}^n\; x^m$ and so this recursive definition is merely reflecting the fact that these sums evaluate to 1 when n=1 for any m. In the alternative convention, the generating function is
B_{n} = 0 for all odd n other than 1. B_{1} = 1/2 or −1/2 depending on the convention adopted (see below). The first few nonzero Bernoulli numbers (sequences A027641 and A027642 in OEIS) and some larger ones are listed below.
n  N  D  B_{n} = N / D 
0  1  1  +1.00000000000 
1  1  2  0.50000000000 
2  1  6  +0.16666666667 
4  1  30  0.03333333333 
6  1  42  +0.02380952381 
8  1  30  0.03333333333 
10  5  66  +0.07575757576 
12  691  2730  0.25311355311 
14  7  6  +1.16666666667 
16  3617  510  7.09215686275 
18  43867  798  +54.9711779448 
n = 10^{k}  N  D  B_{n} = N / D 
2  9.4598037819... × 10^{82}  33330  2.8382249570... × 10^{78} 
3  1.8243104738... × 10^{1778}  342999030  5.3187044694... × 10^{1769} 
4  2.1159583804... × 10^{27690}  2338224387510  9.0494239636... × 10^{27677} 
5  5.4468936061... × 10^{376771}  9355235774427510  5.8222943146... × 10^{376755} 
6  2.0950366959... x 10^{4767553}  936123257411127577818510  2.2379923576... × 10^{4767529} 
7  4.7845869850... × 10^{57675291}  9601480183016524970884020224910  4.9831764414... × 10^{57675260} 
8  1.8637053533... × 10^{676752608}  394815332706046542049668428841497001870  4.7204482677... × 10^{676752569} 
On April 29, 2008 on the 'Wolfram Blog' Oleksandr Pavlyk announced to have computed B_{n} for n = 10^{7} with 'Mathematica'. He waited almost 6 days for the result. Some days later the computation was redone with PARI/GP and B_{n} for n = 10^{7} + 4. The computation run for about 2 days and 12 hours (announced at the sagedevel newsgroup on May 5).
The displayed values for n = 10^{7} and n = 10^{8} were computed in less than one second with the von StaudtClausen formula and the asymptotic formula given below.
Jakob Bernoulli's Summae Potestatum, 1713 
The Bernoulli numbers can be regarded from four main viewpoints:
Each of these viewpoints leads to a set of more or less different conventions.
Bernoulli numbers as standalone arithmetical objects.
Associated sequence: 1/6, −1/30, 1/42, −1/30,...
This is the viewpoint of Jakob Bernoulli.
(See the cutout from his Ars Conjectandi, first edition, 1713).
The Bernoulli numbers are understood as numbers, recursive in nature,
invented to solve a certain arithmetical problem, the summation of powers,
which is the paradigmatic application of the Bernoulli numbers.
It is misleading to call this viewpoint 'archaic'. For example
JeanPierre Serre uses it in
his highly acclaimed book A Course in Arithmetic which
is a standard textbook used at many universities today.
Associated sequence: 1, +1/2, 1/6, 0,....
This view focuses on the connection between Stirling numbers and
Bernoulli numbers and arises naturally in the calculus of finite differences.
In its most general and compact form this connection is summarized by
the definition of the Stirling polynomials σ_{n}(x),
formula (6.52) in Concrete Mathematics by Graham, Knuth and Patashnik.
In consequence B_{n} = n! σ_{n}(1) for n ≥ 0.
Bernoulli numbers as values of a sequence of certain polynomials.
Assuming the Bernoulli polynomials as already introduced
the Bernoulli numbers can be defined in two different ways:
B_{n} = B_{n}(0). Associated sequence: 1, −1/2, 1/6, 0,....
B_{n} = B_{n}(1). Associated sequence: 1, +1/2, 1/6, 0,....
The two definitions differ only in the sign of B_{1}.
The choice B_{n} = B_{n}(0) is the convention used in the Handbook of Mathematical Functions.
Bernoulli numbers as values of the Riemann zeta function.
Associated sequence: 1, +1/2, 1/6, 0,....
This convention agrees with the convention B_{n} = B_{n}(1)(for example J. Neukirch and M. Kaneko).
The sign '+' for B_{1} matches the representation
of the Bernoulli numbers by the Riemann zeta function.
In fact the identity nζ(1−n) = (−1)^{n+1}B_{n}valid for all n > 0 is then replaced by the simpler
nζ(1−n) = −B_{n}. (See the paper of S. C. Woon.)
$B\_n\; =\; n!sigma\_\{n\}(1)\; =\; B\_n(1)\; =\; nzeta(1n)\; quad\; (n\; geq\; 0)$ 
The definition to proceed with was developed by Julius Worpitzky in 1883. It is based on the classical theory of finite differences and on the combinatorial interpretation of the Bernoulli numbers as an instance of a fundamental combinatorial principle, the inclusionexclusion principle. Besides elementary arithmetic only the factorial function n! and the power function k^{m} is employed.
The signless Worpitzky numbers are defined as
They can also be expressed through the Stirling set number
A Bernoulli number is then introduced as an inclusionexclusion sum of Worpitzky numbers weighted by the sequence 1, 1/2, 1/3,...
Worpitzky's representation of the Bernoulli number  
B_{0}  =  1/1 
B_{1}  =  1/1 − 1/2 
B_{2}  =  1/1 − 3/2 + 2/3 
B_{3}  =  1/1 − 7/2 + 12/3 − 6/4 
B_{4}  =  1/1 − 15/2 + 50/3 − 60/4 + 24/5 
B_{5}  =  1/1 − 31/2 + 180/3 − 390/4 + 360/5 − 120/6 
B_{6}  =  1/1 − 63/2 + 602/3 − 2100/4 + 3360/5 − 2520/6 + 720/7 
This representation has B_{1} = 1/2. A similar combinatorial representation derives from
Here the Bernoulli numbers are an inclusionexclusion over the set of lengthn words, where the sum is taken over all words of length n with k distinct letters, and normalized by k + 1. The combinatorics of this representation can be seen from:
Leonhard Euler expressed the Bernoulli numbers in terms of the Riemann zeta function as
The first few Bernoulli numbers might lead one to assume that they are all small. Later values belie this assumption, however. In fact, since the factor in the squared brackets is greater than 1 from this representation follows
so that the sequence of Bernoulli numbers diverges quite rapidly for large indices. Substituting an asymptotic approximation for the factorial function in this formula gives an asymptotic approximation for the Bernoulli numbers. For example
This formula (Peter Luschny, 2007) is based on the connection of the Bernoulli numbers with the Riemann zeta function and on an approximation of the factorial function given by Gergő Nemes in 2007. For example this approximation gives
which is off only by three units in the least significant digit displayed.
The following two inequalities (Peter Luschny, 2007) hold for n > 8 and the arithmetic mean of the two bounds is an approximation of order n^{−3} to the Bernoulli numbers B_{2n}.
Deleting the squared brackets on both sides and replacing on the right hand side the factor 4 by 5 gives simple inequalities valid for n > 1. These inequalities can be compared to related inequalities for the Euler numbers.
For example the low bound for 2n = 1000 is 5.31870445... × 10^{1769}, the high bound is 5.31870448... × 10^{1769} and the mean is 5.31870446942... × 10^{1769}.
The integral
has as special values b(2n) = B_{2n} for n > 0. The integral might be considered as a continuation of the Bernoulli numbers to the complex plane and this was indeed suggested by Peter Luschny in 2004.
For example b(3) = (3/2)ζ(3)Π^{−3}Ι and b(5) = −(15/2) ζ(5) Π^{ −5}Ι. Here ζ(n) denotes the Riemann zeta function and Ι the imaginary unit. It is remarkable that already Leonhard Euler (Opera Omnia, Ser. 1, Vol. 10, p. 351) considered these numbers and calculated
Euler's values are unsigned and real, but obviously his aim was to find a meaningful way to define the Bernoulli numbers at the odd integers n > 1.
The Euler numbers are a sequence of integers intimately connected with the Bernoulli numbers. Comparing the asymptotic expansions of the Bernoulli and the Euler numbers shows that the Euler numbers E_{2n} are in magnitude approximately (2/π)(4^{2n} − 2^{2n}) times larger than the Bernoulli numbers B_{2n}. In consequence
This asymptotic equation reveals that π lies in the common root of both the Bernoulli and the Euler numbers. In fact π could be computed from these rational approximations.
Bernoulli numbers can be expressed through the Euler numbers and vice versa. Since for n odd B_{n} = E_{n} = 0 (with the exception B_{1}), it suffices to regard the case when n is even.
These conversion formulas express an inverse relation between the Bernoulli and the Euler numbers. But more important, there is a deep arithmetic root common to both kinds of numbers, which can be expressed through a more fundamental sequence of numbers, also closely tied to π. These numbers are defined for n > 1 as
and S_{1} = 1 by convention. The magic of these numbers lies in the fact that they turn out to be rational numbers. This was first proved by Leonhard Euler 1734 in a landmark paper `De summis serierum reciprocarum' (On the sums of series of reciprocals) and fascinated mathematicians ever since. The first few of these numbers are
The Bernoulli numbers and Euler numbers are best understood as special views of these numbers, selected from the sequence S_{n} and scaled for use in special applications.
The expression [n even] has the value 1 if n is even and 0 otherwise (Iverson bracket).
These identities show that the quotient of Bernoulli and Euler numbers at the beginning of this section is just the special case of R_{n} = 2 S_{n} / S_{n+1} when n is even. The R_{n} are rational approximations to π and two successive terms always enclose the true value of π. Beginning with n = 1 the sequence starts
These rational numbers also appear in the last paragraph of Euler's paper cited above. But it was only in September 2007 that this classical sequence found its way into the Encyclopedia of Integer Sequences (A132049).
The sequence S_{n} has another unexpected yet important property: The denominators of S_{n} divide the factorial (n − 1)!. In other words: the numbers T_{n} = S_{n}(n − 1)! are integers.
Thus the above representations of the Bernoulli and Euler numbers can be rewritten in terms of this sequence as
These identities make it easy to compute the Bernoulli and Euler numbers: the Euler numbers E_{n} are given immediately by T_{2n + 1} and the Bernoulli numbers B_{2n} are obtained from T_{2n} by some easy shifting, avoiding rational arithmetic.
What remains is to find a convenient way to compute the numbers T_{n}. However, already in 1877 Philipp Ludwig von Seidel published an ingenious algorithm which makes it extremely simple to calculate T_{n}.
Seidel's algorithm for T_{n} 
[begin] Start by putting 1 in row 0 and let k denote the number of the row currently being filled. If k is odd, then put the number on the left end of the row k − 1 in the first position of the row k, and fill the row from the left to the right, with every entry being the sum of the number to the left and the number to the upper. At the end of the row duplicate the last number. If k is even, proceed similar in the other direction. [end]
Seidel's algorithm is in fact much more general (see the exposition of Dominique Dumont (1981)) and was rediscovered several times thereafter.
Similar to Seidel's approach D. E. Knuth and T. J. Buckholtz (1967) gave a recurrence equation for the numbers T_{2n} and recommended this method for computing B_{2n} and E_{2n} ‘on electronic computers using only simple operations on integers’.
V. I. Arnold rediscovered Seidel's algorithm in 1991 and later Millar, Sloane and Young popularized Seidel's algorithm under the name boustrophedon transform.
Around 1880, three years after the publication of Seidel's algorithm, Désiré André proved a now classic result of combinatorial analysis. Looking at the first terms of the Taylor expansion of the trigonometric functions tan x and sec x André made a startling discovery.
The coefficients are the Euler numbers of odd and even index, respectively. In consequence the ordinary expansion of tan x + sec x has as coefficients the rational numbers S_{n}.
André then succeeded by means of a recurrence argument to show that the alternating permutations of odd size are enumerated by the Euler numbers of odd index (also called tangent numbers) and the alternating permutations of even size by the Euler numbers of even index (also called secant numbers).
The Bernoulli polynomials can be regarded as generalizations of the Bernoulli numbers the same as the Euler polynomials are generalizations of the Euler numbers. However, the most beautiful generalization of this kind is the sequence of the Euler–Worpitzky–Chen polynomials W_{n}(x), which have only integer coefficients, in contrast to the rational coefficients of the Bernoulli and Euler polynomials. These polynomials are closely related to whole family of numbers under consideration here.
The sequence W_{n}(0) gives the signed tangent numbers and the sequence W_{n}(1) the signed secant numbers, the coefficients of the hyperbolic functions tanh(−x) and sech(−x) in exponential expansion, respectively. And the sequence W_{n − 1}(0) n / (2^{n} − 4^{n}) gives the Bernoulli numbers for n > 1.
The Bernoulli numbers can be expressed in terms of the Riemann zeta function as B_{n} = − nζ(1 − n) for integers n ≥ 0 provided for n = 0 and n = 1 the expression − nζ(1 − n) is understood as the limiting value and the convention B_{1} = 1/2 is used. This intimately relates them to the values of the zeta function at negative integers. As such, they could be expected to have and do have deep arithmetical properties, a fact discovered by Kummer in his work on Fermat's last theorem.
Divisibility properties of the Bernoulli numbers are related to the ideal class groups of cyclotomic fields by a theorem of Kummer and its strengthening in the HerbrandRibet theorem, and to class numbers of real quadratic fields by AnkenyArtinChowla. We also have a relationship to algebraic Ktheory; if c_{n} is the numerator of B_{n}/2n, then the order of $K\_\{4n2\}(Bbb\{Z\})$ is −c_{2n} if n is even, and 2c_{2n} if n is odd.
The AgohGiuga conjecture postulates that p is a prime number if and only if pB_{p−1} is congruent to −1 mod p.
The von StaudtClausen theorem was given by Karl Georg Christian von Staudt and Thomas Clausen independently in 1840. It describes the arithmetical structure of the Bernoulli numbers.
The von StaudtClausen theorem has two parts. The first one describes how the denominators of the Bernoulli numbers can be computed. Paraphrasing the words of Clausen it can be stated as:
The denominator of the 2nth Bernoulli number can be found as follows: Add to all divisors of 2n, 1,2,a,a',...,2n the unity, which gives the sequence 2,3,a+1,a'+1,...,2n+1. Select from this sequence only the prime numbers 2,3,p,p', etc. and build their product.
Clausen's algorithm translates almost verbatim to a modern computer algebra program, which looks similar to the pseudocode on the left hand site of the following table. On the right hand side the computation is traced for the input n = 88. It shows that the denominator of B_{88} is 61410.
Clausen's algorithm for the denominator of B_{n}  
Clausen: function(integer n)    n = 88 
S = divisors(n);    {1, 2, 4, 8, 11, 22, 44, 88} 
S = map(k → k+1, S);    {2, 3, 5, 9, 12, 23, 45, 89} 
S = select(isprime, S);    {2, 3, 5, 23, 89} 
return product(S);    61410 
The second part of the von StaudtClausen theorem is a very remarkable representation of the Bernoulli numbers. This representation is given for the first few nonzero Bernoulli numbers in the next table.
Von StaudtClausen representation of B_{n}  
B_{0}  =  1 
B_{1}  =  1 − 1/2 
B_{2}  =  1 − 1/2 − 1/3 
B_{4}  =  1 − 1/2 − 1/3 − 1/5 
B_{6}  =  1 − 1/2 − 1/3 − 1/7 
B_{8}  =  1 − 1/2 − 1/3 − 1/5 
B_{10}  =  1 − 1/2 − 1/3 − 1/11 
The theorem affirms the existence of an integer I_{n} such that
The sum is over the primes p for which p−1 divides n. These are the same primes which are employed in the Clausen algorithm. The proposition holds true for all n ≥ 0, not only for even n. I_{1} = 2 and for odd n > 1 I_{n} = 1.
Consequences of the von StaudtClausen theorem are: the denominators of the Bernoulli numbers are squarefree and for n >= 2 divisible by 6.
From the von StaudtClausen theorem it is known that for odd n > 1 the number 2B_{n} is an integer. This seems trivial if one knows beforehand that in this case B_{n} = 0. However, by applying Worpitzky's representation one gets
as a sum of integers, which is not trivial. Here a combinatorial fact comes to surface which explains the vanishing of the Bernoulli numbers at odd index. Let S_{n,m} be the number of surjective maps from {1,2,...,n} to {1,2,...,m}, then $S\_\{n,m\}=m!\; left\{begin\{matrix\}\; n\; m\; end\{matrix\}right\}$. The last equation can only hold if
This equation can be proved by induction. The first two examples of this equation are
n = 4 : 2 + 8 = 7 + 3, n = 6: 2 + 120 + 144 = 31 + 195 + 40.
Thus the Bernoulli numbers vanish at odd index because some nonobvious combinatorial identities are embodied in the Bernoulli numbers.
An especially important congruence property of the Bernoulli numbers can be characterized as a padic continuity property. If b, m and n are positive integers such that m and n are not divisible by p − 1 and $m\; equiv\; n,\; bmod,p^\{b1\}(p1)$, then
Since $B\_n\; =\; nzeta(1n)$, this can also be written
where u = 1 − m and v = 1 − n, so that u and v are nonpositive and not congruent to 1 mod p − 1. This tells us that the Riemann zeta function, with 1 − p^{−s} taken out of the Euler product formula, is continuous in the padic numbers on odd negative integers congruent mod p − 1 to a particular $a\; notequiv\; 1,\; bmod,\; p1$, and so can be extended to a continuous function $zeta\_p(s)$ for all padic integers $Bbb\{Z\}\_p,,$ the padic Zeta function.
The following relations, due to Ramanujan, provide a more efficient method for calculating Bernoulli numbers:
In some applications it is useful to be able to compute the Bernoulli numbers B_{0} through B_{p − 3} modulo p, where p is a prime; for example to test whether Vandiver's conjecture holds for p, or even just to determine whether p is an irregular prime. It is not feasible to carry out such a computation using the above recursive formulae, since at least (a constant multiple of) p^{2} arithmetic operations would be required. Fortunately, faster methods have been developed (see Buhler et al) which require only O(p (log p)^{2}) operations (see bigO notation).
The KervaireMilnor formula for the order of the cyclic group of diffeomorphism classes of exotic (4n − 1)spheres which bound parallelizable manifolds for $n\; ge\; 2$ involves Bernoulli numbers; if B_{(n)} is the numerator of B_{4n}/n, then
is the number of such exotic spheres. (The formula in the topological literature differs because topologists use a different convention for naming Bernoulli numbers; this article uses the number theorists' convention.)
Thus the determinant is σ_{n}(1), the Stirling polynomial at x = 1.
Let n ≥ 1.
Let n ≥ 1 and m ≥ 1.
Let n ≥ 4 and
the harmonic number. Then
Let n ≥ 4. Yuri Matiyasevich found (1997)
Let n ≥ 1
This is an identity by FaberPandharipandeZagierGessel. Choose x = 0 or x = 1 to get a Bernoulli number identity according to your favourite convention.
B_{n} = 

