For a concrete comparison, take on . The integral is , whereas the unit-width left and right Riemann sums are and . The exact integer power sum formula gives
The endpoint choice explains the opposite signs of the correction. The remaining correction is one in both cases.
Figure 1.
Left and right Riemann sums for differ from its integral by exact Bernoulli number corrections
. Six rectangles of width one sample at on the left and on the right. Their areas are and ; the smooth area is . The endpoint terms are and , while the correction adds one in each case. Details.
The same method is useful far beyond squares of numbers. Substituting , , and into the integer power sum formula gives the exact fourth-power result
At , this is
Thus a finite polynomial calculation replaces ten additions, or a million additions if is a million. Although the individual corrections can be rational numbers, the result is the exact integer sum.
Figure 2.
Exact Bernoulli number corrections turn an integral into the fourth-power sum
. The first panel builds the sum from integral , endpoint term , and term . The enlarged second panel resolves the final correction , reaching , checked independently by direct addition. Details.
There is also a useful numerical integration interpretation. The average of the left and right Riemann sums is the composite trapezoidal rule. For , the endpoint corrections cancel but its value is , one above the true integral. Subtracting the correction makes this particular polynomial example exact. For , the two interior corrections above can be written and . These are exact identities for these polynomials; extending such corrections to general functions requires a separate error analysis.
Bernoulli number Created 2026-10-05 Updated 2026-10-13
The Bernoulli numbers are a sequence of rational numbers that turns integer power sums into exact polynomials. The same numbers describe corrections when a discrete summation is compared with an integral. For example, the sum of squares is : the leading term is an integral, while the last two terms repair the difference between area and sampled values.
We use throughout. The defining exponential generating function is
Here is the exponential function and is a factorial; in particular, the coefficient of is , rather than . At the quotient has limiting value one. The identity can be read algebraically as a formal power series, or as a convergent series for .[ref]
To compute the numbers, multiply by and compare coefficients. The resulting recurrence relation, with binomial coefficients, is
Thus , , and give , , and . Continuing gives
The recurrence relation agrees with equation 24.5.3 after replacing its index by .[ref]
Why do so many values vanish? Put . Direct substitution gives , so is an even function. Its odd power series coefficients vanish: for every positive integer . The exception matters. The alternative convention obtained from has and exactly the same other values. A formula copied between conventions must also retain its summation endpoints.
Historically, integer power sums were studied before the modern Bernoulli number notation. A historical study examines formulas published in 1631 and distinguishes those separate formulas from encoding all exponents using one sequence of constants. This is a useful motivation for the generating function, without assigning all discovery to a single moment. [ref]