<-- Back to the home page

Bell Numbers

BnB_n is the number of set partitions of an nn element set.

A000110 on the OEIS

Basic Recurrence

B0=1B_0 = 1

Bn+1=k=0n(nk)BkB_{n+1}=\sum_{k=0}^{n} \binom{n}{k} B_k

Formulas

Bn=1ek=0knk!B_n=\frac{1}{e}\sum_{k=0}^\infty \frac{k^n}{k!}

Bn=k=1nknk!j=0nk(1)jj!B_{n}=\sum_{k=1}^{n}\frac{k^{n}}{k!}\sum_{j=0}^{n-k}\frac{(-1)^{j}}{j!}

Bn=k=0n{nk}B_n=\sum_{k=0}^n \left\{{n\atop k}\right\}

where {nk}\left\{{n\atop k}\right\} is a Stirling Number of the second kind

Generating functions

Exponential generating function

B(x)=n=0Bnn!xn=eex1B(x) = \sum_{n=0}^\infty \frac{B_n}{n!} x^n = e^{e^x-1}

Software

https://rosettacode.org/wiki/Bell_numbers

Articles

https://en.wikipedia.org/wiki/Bell_number

Blog posts

Talks about computing bell numbers efficiently. https://fredrikj.net/blog/2015/08/computing-bell-numbers/