# Bernoulli Numbers

Standard

I have referred to them once so far. Also, the Euler-Maclaurin formula I discussed in that post, explains a lot about their occurrences (for example). Now I think it’s time to dive deeper and try to understand them.

In 1631, Johann Faulhaber   published Academia Algebra (it was a German text despite the Latin title). This text contains a generalisation of sums of powers, which in modern notations reads:

$\displaystyle{\sum_{m=1}^{n} m^{k-1} = \frac{1}{k}\left[n^k + \binom{k}{1} n^{k-1} \times \frac{1}{2} + \binom{k}{2}n^{k-2} \times \frac{1}{6} +\binom{k}{3}n^{k-3} \times 0+\binom{k}{4}n^{k-4} \times \frac{-1}{30}+ \ldots\right]}$

Observe that the expression on the right hand side in square brackets appears like binomial expansion, but there are some constant terms multiplied to them (which can also be 0). These constant terms were named “Bernoulli Numbers” by Abraham de Moivre, since they were intensively discussed by Jacob (Jacques) Bernoulli in Ars Conjectandi published in Basel in 1713, eight years after his death.

I will follow the notation from The book of numbers (published  in 1996). So we will denote $n^{th}$ Bernoulli number by $B^{n}$ where

$\displaystyle{B^0 = 1, B^1 = \frac{1}{2}, B^2 = \frac{1}{6}, B^3= B^{5} = \ldots = B^{odd} = 0, B^4 = B^8 = \frac{-1}{30}, B^6 = \frac{1}{42}, B^{10} = \frac{5}{66}, \ldots}$

This notation enables us to calculate sum of $k^{th}$ power of first $n$ natural numbers quickly. We can re-write above summation formula as:

$\displaystyle{\sum_{m=1}^n m^{k-1} = \frac{(n+B)^k - B^k}{k}}$

To illustrate, how to use this formula, let’s calculate sum of $5^{th}$ powers of first 1000 natural numbers:

$\displaystyle{\sum_{m=1}^{1000} m^{5} = \frac{(1000+B)^6 - B^6}{6}}$

$\displaystyle{ = \frac{1}{6}\left[1000^6 + 6B^1 1000^5 + 15B^2 1000^4 + 15 B^4 1000^2\right]}$

So, we have done binomial expansion of the right hand side and used the fact that $B^{odd>1} = 0$. Now we will replace corresponding values of Bernoulli Numbers to get:

$\displaystyle{\sum_{m=1}^{1000} m^{5} =\frac{1}{6}\left[10^{18} + 3\times 10^{15} + 2.5 \times 10^{12} - 0.5 \times 10^6\right]=\frac{1003002499995\times 10^5}{6}}$

$1^5 + 2^5 + \cdots + 1000^5 = 16716708333250000$

(This answer was cross-checked  using SageMath)

There are many ways to calculate the value of Binomial numbers, but the simplest one is to using the recursive definition:

$(B - 1)^k = B^k$ for k>1, gives value of $B^{k-1}$

There is another definition of Bernoulli  Numbers using power series:

$\displaystyle{\frac{z}{e^z-1} = \sum_{k=0}^{\infty} \frac{B^k z^k}{k!}}$

This gives slightly different sequence of Bernoulli numbers, since in this $B^{1}=\frac{-1}{2}$, and the recursive definition is

$(B+1)^{k} = B^{k}$ for k>1, gives value of $B^{k-1}$

This definition can be used to calculate val value of  $\tan(z)$,  since its infinite series expression has Bernoulli numbers in coefficients.

$\displaystyle{\tan(z)=\sum_{n=0}^{\infty}\frac{B^{2n}(-4)^n(1-4^n)}{2n!}z^{2n-1}}$