For questions related to the Bell numbers, a sequence of natural numbers that occur in partitioning a finite set.
In combinatorial mathematics, the Bell number $B_n$ is the number of possible partitions of an $n$-element set (not to be confused with the bernoulli-numbers, which are also commonly denoted $B_n$).
The first few Bell numbers are: $1, 1, 2, 5, 15, 52, 203, 877, 4140, 21147, \dots$ (sequence A000110 in the OEIS).
These numbers have been studied by mathematicians since the 19th century, and their roots go back to medieval Japan, but they are named after the Scottish-born mathematician Eric Temple Bell (1883–1960), who wrote about them in the 1930s.
The Bell numbers satisfy the following
- a recurrence relation involving binomial-coefficients: $$B_{n+1}=\sum_{k=0}^{n} \binom{n}{k} B_k.$$
- a formula involving stirling-numbers of the second kind: $$B_n=\sum_{k=0}^n \left\{{n\atop k}\right\}.$$
- an identity involving both binomial-coefficients and stirling-numbers of the second kind (Spivey (2008)): $$B_{n+m} = \sum_{k=0}^n \sum_{j=0}^m \left\{{m\atop j}\right\} {n \choose k} j^{n-k} B_k.$$
- Dobiński's formula: $$B_n = \frac1e \sum_{k=0}^\infty \frac{k^n}{k!}.$$
- a complex integral representation $$ B_n = \frac{n!}{2 \pi i e} \int_{\gamma} \frac{e^{e^z}}{z^{n+1}} \, \mathrm{d}z. $$
The generating function of the Bell numbers is $$B(x) = \sum_{n=0}^\infty \frac{B_n}{n!} x^n = e^{e^x-1}.$$
The Bell numbers are periodic modulo $p$, where $p$ is any prime number, because of Touchard's congruence.
$$B_{p+n}\equiv B_{n}+B_{n+1}{\pmod {p}}$$ or, more generally, $$B_{p^{m}+n}\equiv mB_{n}+B_{n+1}{\pmod {p}}.$$
The period of the Bell numbers to modulo $n$ are described by the sequence A054767 in the OEIS.