In mathematics, the Bernoulli numbers Bn are a sequence of rational numbers with deep connections to number theory. The values of the first few Bernoulli numbers are B0 =1, B±1 = ±1/2, B2 = 1/6, B3 =0, B4 = −1/30, B5 =0, B6 = 1/42, B7 =0, B8 = −1/30. The superscript ± is used by this article to designate the two conventions for Bernoulli numbers. They differ only in the sign of the n =1 term, B−n are the first Bernoulli numbers, in this convention, B−1 = −1/2. B+n are the second Bernoulli numbers, which are called the original Bernoulli numbers. In this convention, B+1 = +1/2, since Bn =0 for all odd n >1, and many formulas only involve even-index Bernoulli numbers, some authors write Bn to mean B2n. This article does not follow this notation, the Bernoulli numbers were discovered around the same time by the Swiss mathematician Jacob Bernoulli, after whom they are named, and independently by Japanese mathematician Seki Kōwa. Sekis discovery was published in 1712 in his work Katsuyo Sampo, Bernoullis, also posthumously. Ada Lovelaces note G on the Analytical Engine from 1842 describes an algorithm for generating Bernoulli numbers with Babbages machine, as a result, the Bernoulli numbers have the distinction of being the subject of the first published complex computer program. Bernoulli numbers feature prominently in the form expression of the sum of the mth powers of the first n positive integers. For m, n ≥0 define S m = ∑ k =1 n k m =1 m +2 m + ⋯ + n m and this expression can always be rewritten as a polynomial in n of degree m +1. The coefficients of polynomials are related to the Bernoulli numbers by Bernoullis formula, S m =1 m +1 ∑ k =0 m B k + n m +1 − k. For example, taking m to be 1 gives the triangular numbers 0,1,3,6, … A000217,1 +2 + ⋯ + n =12 =12. Taking m to be 2 gives the square pyramidal numbers 0,1,5,14,12 +22 + ⋯ + n 2 =13 =13. Some authors use the convention for Bernoulli numbers and state Bernoullis formula in this way. Bernoullis formula is sometimes called Faulhabers formula after Johann Faulhaber who also found ways to calculate sums of powers. Faulhabers formula was generalized by V. Guo and J. Zeng to a q-analog, many characterizations of the Bernoulli numbers have been found in the last 300 years, and each could be used to introduce these numbers. Here only four of the most useful ones are mentioned, an equation, an explicit formula, a generating function
A page from Seki Kōwa's Katsuyo Sampo (1712), tabulating binomial coefficients and Bernoulli numbers
Jakob Bernoulli's "Summae Potestatum", 1713
The Bernoulli numbers as given by the Riemann zeta function.