Bell Numbers

How many ways can you split a set of nn distinguishable objects into unlabeled groups? This question, innocent as it sounds, has no simple closed formula. Yet it generates one of the richest integer sequences in combinatorics: the Bell numbers. They count every possible way of partitioning a finite set. There is no constraint on the number or size of the blocks. This makes them the master total that sits above the finer-grained Stirling Numbers of the Second Kind. The Bell numbers matter because "partition a set into unlabeled nonempty groups" is one of the most fundamental operations in mathematics. It underlies equivalence relations, clustering, unlabeled graph coloring classes, and the combinatorics of exponential structures. Whenever a problem reduces to "count the ways to group things with no group ordering and no group labels," a Bell number is often lurking nearby. It is exactly this pattern that gives the count in The Twelvefold Way for distributing distinguishable balls into indistinguishable boxes with no restriction on occupancy. The big picture is that the Bell numbers admit three complementary faces. There is a sum over Stirling numbers (structural, block-counting). There is a recurrence discovered by counting partitions according to the block containing the largest element. There is also a strikingly elegant exponential generating function eex−1e^{e^x-1}. Remarkably, all three are computable by hand for small nn. A beautiful device called the Bell triangle turns the recurrence into pure arithmetic. It uses no factorials, no Stirling numbers, just additions. This article builds the theory from the ground up. It gives the precise definition, and a full proof of the Bell recurrence via a bijective/combinatorial argument. It offers a self-contained derivation of the exponential generating function using the Exponential Generating Functions machinery. It also gives a careful development of the Bell triangle, with a proof that it computes exactly the numbers it claims to. Two fully worked numerical examples follow. A counterexample probes what happens without the finiteness hypothesis. A tour of applications closes out the treatment.

Key takeaways
  • The Bell number BnB_n counts the number of set partitions of an nn-element set, with B0=1B_0 = 1.
  • Bn=∑k=0nS(n,k)B_n = \sum_{k=0}^n S(n,k), a sum of Stirling Numbers of the Second Kind over all possible numbers of blocks kk.
  • The Bell recurrence Bn+1=∑k=0n(nk)BkB_{n+1} = \sum_{k=0}^n \binom{n}{k} B_k comes from tracking the block containing one distinguished element.
  • The exponential generating function is ∑n≥0Bnxnn!=eex−1\sum_{n\ge 0} B_n \frac{x^n}{n!} = e^{e^x - 1}, provable directly from the Exponential Generating Functions product/composition rules.
  • The Bell triangle is a Pascal-like array of integers whose left edge lists B0,B1,B2,…B_0, B_1, B_2, \dots and whose entries are pure sums, giving an efficient hand computation method.
  • Key idea: counting all unlabeled partitions of a finite set reduces to a single clean recurrence obtained by isolating one marked element and choosing its companions.

Where this lives today

The Bell numbers appear whenever a counting problem reduces to "partition a labeled finite set with no constraint on block count or size." In combinatorics on words and set systems, they count the number of distinct equivalence relations on a finite set (since equivalence relations on [n][n] correspond bijectively to partitions of [n][n]). In the theory of the twelvefold way — the master classification of the twelve basic counting problems for distributing balls into boxes — the Bell number is exactly the count for distributing nn distinguishable balls into indistinguishable boxes with no occupancy restriction, foreshadowed and formally placed in The Twelvefold Way. In statistics and data analysis, Bell numbers bound or estimate the number of possible clusterings of nn labeled data points into an unspecified number of unlabeled clusters, relevant to clustering-algorithm complexity analysis and to model-selection problems where the number of clusters is itself unknown. In computer science, the Bell numbers arise in the analysis of algorithms enumerating all partitions of a finite set (used, for instance, in symbolic computation systems and in generating test cases for graph coloring and hypergraph partitioning problems), and the Bell triangle provides an O(n2)O(n^2)-time, purely additive algorithm for tabulating B0,…,BnB_0, \ldots, B_n without ever computing a factorial or binomial coefficient directly. In algebraic combinatorics and umbral calculus, Bell numbers are the "moments" of the Poisson distribution with parameter 11 — a fact traceable directly to the exponential generating function eex−1e^{e^x-1}, since the moment generating function of a Poisson(λ\lambda) random variable is eλ(et−1)e^{\lambda(e^t-1)}, which at λ=1\lambda=1 is exactly B(t)B(t). This links the purely combinatorial Bell numbers to probability theory in a precise, checkable way: Bn=E[Xn]B_n = \mathbb{E}[X^n] for X∼Poisson(1)X \sim \mathrm{Poisson}(1). In cryptography and coding theory, related exponential-structure counting techniques (of which the Bell/Stirling framework is the prototypical example) inform the enumeration of equivalence classes under group actions, relevant to isomorphism-counting problems for combinatorial designs.

Ask the tutor: How does the Bell number formula change if I require every block to have size at least 22?

DefinitionSet partition and the Bell number

Let [n]={1,2,…,n}[n] = \{1, 2, \dots, n\} for n≥1n \geq 1, and let [0]=∅[0] = \varnothing. A partition of a set XX is a collection π={A1,A2,…,Ak}\pi = \{A_1, A_2, \dots, A_k\} of pairwise disjoint, nonempty subsets of XX, called blocks, such that

A1∪A2∪⋯∪Ak=X.A_1 \cup A_2 \cup \cdots \cup A_k = X.

The blocks are unordered and unlabeled: two partitions are considered identical if they consist of the same subsets, regardless of the order in which those subsets are listed. The Bell number BnB_n is the total number of partitions of the set [n][n]:

Bn=#{π:π is a partition of [n]}.B_n = \#\{\pi : \pi \text{ is a partition of } [n]\}.

By convention B0=1B_0 = 1, corresponding to the unique partition of the empty set (the empty collection of blocks).

Intuition

Think of [n][n] as nn labeled balls that must be dropped into some number of identical, unlabeled bins, with every bin required to be nonempty and every ball required to land somewhere. The bins have no names and no order — swapping two bins that hold the same balls changes nothing. The Bell number BnB_n counts the total number of distinct outcomes of this process, summed over every possible number of bins from 11 (all balls together) to nn (every ball alone). This is different from the Stirling number S(n,k)S(n,k), which fixes the number of bins at exactly kk. The Bell number aggregates over all kk:

Bn=∑k=0nS(n,k),n≥1,B_n = \sum_{k=0}^{n} S(n,k), \qquad n \ge 1,

with the convention S(0,0)=1S(0,0)=1 giving B0=1B_0=1 consistently. This sum is not a definition-by-fiat; it is an immediate consequence of partitioning the set of all partitions of [n][n] according to how many blocks they have — a partition of [n][n] has some well-defined number of blocks k∈{1,…,n}k \in \{1, \dots, n\}, and S(n,k)S(n,k) counts exactly those with kk blocks, so summing over kk recovers the total. The more subtle and useful fact is the recurrence: to build a partition of [n+1][n+1], look at the block containing the element n+1n+1. That block consists of n+1n+1 together with some subset of the other nn elements — say a subset of size n−kn-k for some kk, chosen in (nn−k)=(nk)\binom{n}{n-k} = \binom{n}{k} ways — and the remaining kk elements must themselves be partitioned in some way, contributing a factor of BkB_k. Summing over how many elements join n+1n+1 in its block gives the Bell recurrence proved below.

Figure
Partitions of a 3-element set, organized by block count, summing to B3=5B_3 = 5
Partitions of {1,2,3}: S(3,1)=1, S(3,2)=3, S(3,3)=1, total B₃ = 5 k=1 block: {1,2,3} k=2 blocks: {1,2} {3} {1,3} {2} {2,3} {1} k=3 blocks: {1} {2} {3}
TheoremBell recurrence

For every integer n≥0n \ge 0,

Bn+1=∑k=0n(nk)Bk.B_{n+1} = \sum_{k=0}^{n} \binom{n}{k} B_k.
Proof

We use a direct combinatorial (bijective counting) argument, together with the additivity of counting over a partition of the sample space.

Setup. Fix n≥0n \ge 0 and consider the set [n+1]={1,2,…,n,n+1}[n+1] = \{1, 2, \dots, n, n+1\}. We count the partitions of [n+1][n+1] by conditioning on the block that contains the specific element n+1n+1; call this block B(n+1)B(n+1).

Step 1: classify by the size of the companion set. Since B(n+1)⊆[n+1]B(n+1) \subseteq [n+1] and n+1∈B(n+1)n+1 \in B(n+1), we may write

B(n+1)={n+1}∪C,B(n+1) = \{n+1\} \cup C,

where C⊆{1,2,…,n}C \subseteq \{1, 2, \dots, n\} is the (possibly empty) set of elements from [n][n] that share a block with n+1n+1. Let k=n−∣C∣k = n - |C|, i.e. ∣C∣=n−k|C| = n-k, so kk ranges over {0,1,…,n}\{0, 1, \dots, n\} and represents the number of elements of [n][n] not in the block of n+1n+1. The set of all partitions of [n+1][n+1] is the disjoint union, over k=0,1,…,nk = 0, 1, \dots, n, of the set of partitions in which exactly kk elements of [n][n] lie outside the block of n+1n+1. This is a genuine partition of the sample space (each partition of [n+1][n+1] has a uniquely determined companion set CC, hence a uniquely determined kk), so by additivity of counting,

Bn+1=∑k=0n(number of partitions of [n+1] with exactly k elements of [n] outside B(n+1)).B_{n+1} = \sum_{k=0}^n (\text{number of partitions of } [n+1] \text{ with exactly } k \text{ elements of } [n] \text{ outside } B(n+1)).

Step 2: count each term by a two-stage choice. Fix k∈{0,…,n}k \in \{0, \dots, n\}. A partition of [n+1][n+1] of this type is uniquely specified by two independent pieces of data: 1. The set C⊆[n]C \subseteq [n] with ∣C∣=n−k|C| = n-k that, together with n+1n+1, forms the block B(n+1)={n+1}∪CB(n+1) = \{n+1\}\cup C. There are (nn−k)=(nk)\binom{n}{n-k} = \binom{n}{k} choices for CC (choosing which n−kn-k of the nn elements of [n][n] join n+1n+1; equivalently, choosing the complementary set of kk elements that stay outside). 2. A partition of the remaining kk elements — those in [n]∖C[n] \setminus C, a set of size kk — into blocks. Since blocks are determined purely by which elements group together, the number of ways to partition any kk-element set is BkB_k, independent of which kk elements they are (partitions of [n]∖C[n]\setminus C are in bijection with partitions of [k][k] via any fixed bijection [n]∖C→[k][n]\setminus C \to [k], since the definition of a partition depends only on the equality/inequality structure, not on the labels themselves). These two choices are independent and jointly determine the full partition of [n+1][n+1]: the block containing n+1n+1 is {n+1}∪C\{n+1\}\cup C, and the remaining blocks are exactly the blocks of the chosen partition of [n]∖C[n]\setminus C. Conversely, every partition of [n+1][n+1] with companion-set size n−kn-k arises this way, and distinct choices of (C,partition of [n]∖C)(C, \text{partition of } [n]\setminus C) give distinct partitions of [n+1][n+1] (they differ either in the block containing n+1n+1, or, if not, in some other block). Hence the number of partitions of [n+1][n+1] with exactly kk elements outside B(n+1)B(n+1) equals

(nk)⋅Bk.\binom{n}{k} \cdot B_k.

Step 3: sum. Combining Steps 1 and 2,

Bn+1=∑k=0n(nk)Bk,B_{n+1} = \sum_{k=0}^n \binom{n}{k} B_k,

as claimed. ■\blacksquare

∎
CorollaryFirst values

Using B0=1B_0 = 1 and the recurrence:

B1=(00)B0=1,B_1 = \binom{0}{0}B_0 = 1,
B2=(10)B0+(11)B1=1+1=2,B_2 = \binom{1}{0}B_0 + \binom{1}{1}B_1 = 1+1 = 2,
B3=(20)B0+(21)B1+(22)B2=1+2+2=5,B_3 = \binom{2}{0}B_0+\binom{2}{1}B_1+\binom{2}{2}B_2 = 1+2+2 = 5,
B4=(30)B0+(31)B1+(32)B2+(33)B3=1+3+6+5=15,B_4 = \binom{3}{0}B_0+\binom{3}{1}B_1+\binom{3}{2}B_2+\binom{3}{3}B_3 = 1+3+6+5 = 15,
B5=(40)B0+(41)B1+(42)B2+(43)B3+(44)B4=1+4+12+20+15=52.B_5 = \binom{4}{0}B_0+\binom{4}{1}B_1+\binom{4}{2}B_2+\binom{4}{3}B_3+\binom{4}{4}B_4 = 1+4+12+20+15=52.

These match direct enumeration (e.g. B3=5B_3 = 5 is exactly the five partitions of {1,2,3}\{1,2,3\} pictured above).

TheoremExponential generating function of the Bell numbers

Define B(x)=∑n=0∞Bnxnn!B(x) = \sum_{n=0}^\infty B_n \dfrac{x^n}{n!}, the exponential generating function of the sequence (Bn)n≥0(B_n)_{n\ge0}. Then this power series has positive radius of convergence and

B(x)=eex−1.B(x) = e^{e^x - 1}.
Proof

We give a proof via the exponential formula for labeled structures, derived here from first principles using the Stirling-number decomposition, so the argument is self-contained given only the EGF product rule (the EGF of a sequence counting "labeled structure on a set, decomposed into an ordered sequence of substructures on a set partition" equals the appropriate composition/exponential of building-block EGFs — we re-derive the specific instance needed rather than citing the formula as a black box).

Step 1: EGF of "exactly one nonempty block." A single nonempty block on a labeled set of size m≥1m \ge 1 can be realized in exactly 11 way (there is only one way to make a given set into a single block). So the sequence "11 if m≥1m\ge1, else 00" has EGF

f(x)=∑m=1∞xmm!=ex−1.f(x) = \sum_{m=1}^\infty \frac{x^m}{m!} = e^x - 1.

Step 2: EGF of "a set partition into exactly kk unlabeled nonempty blocks", summed with a marker for kk. We first handle ordered partitions into exactly kk blocks (an ordered kk-tuple of disjoint nonempty subsets covering [n][n]), and then divide by k!k! to un-order them. Fix k≥1k \ge 1. The number of ways to partition [n][n] into an ordered sequence of kk nonempty, disjoint blocks (A1,…,Ak)(A_1, \ldots, A_k) whose union is [n][n] is exactly k! S(n,k)k! \, S(n,k), since each unordered partition into kk blocks gives rise to k!k! ordered versions and no two distinct unordered partitions or two distinct orderings coincide. The EGF product rule states: if ana_n is the number of ways to linearly order a labeled structure on [n][n] as a sequence of kk "pieces" built from a class with EGF f(x)f(x) (each piece a nonempty labeled block, here with per-block EGF f(x)=ex−1f(x) = e^x-1 from Step 1), assembled by first partitioning [n][n] into an ordered sequence of kk blocks and then decorating each block independently, then the EGF of (an)n(a_n)_n is f(x)kf(x)^k. This is because multiplying EGFs corresponds exactly to the "choose a subset for block 1, a subset for block 2 among what remains, etc." labeled product construction: for each nn,

[xn]n! f(x)k=∑n1+⋯+nk=n(nn1,…,nk)∏i=1k[count of block i structure on ni elements],[x^n] n!\, f(x)^k = \sum_{n_1+\cdots+n_k = n} \binom{n}{n_1,\ldots,n_k} \prod_{i=1}^k [\text{count of block } i \text{ structure on } n_i \text{ elements}],

which for our case (each block simply "is" a set, weight 11 if nonempty) gives precisely the count of ordered partitions of [n][n] into kk nonempty labeled blocks. Concretely here, since each block's generating function is ex−1e^x - 1,

(ex−1)k=∑n(k! S(n,k))xnn!,(e^x-1)^k = \sum_{n} \left(k!\, S(n,k)\right)\frac{x^n}{n!},

which is a standard and directly checkable identity: expanding (ex−1)k(e^x-1)^k via inclusion–exclusion on which of kk "slots" a given element may avoid recovers the standard formula

S(n,k)=1k!∑j=0k(−1)j(kj)(k−j)n,S(n,k) = \frac{1}{k!}\sum_{j=0}^k (-1)^j \binom{k}{j}(k-j)^n,

and one verifies directly that [xn] n! (ex−1)k[x^n]\,n!\,(e^x-1)^k equals k!k! times this expression, by expanding (ex−1)k=∑j=0k(kj)(−1)k−jejx(e^x - 1)^k = \sum_{j=0}^k \binom{k}{j}(-1)^{k-j} e^{jx} and reading off coefficients: [xn]n! ejx=jn[x^n] n!\, e^{jx} = j^n, so

[xn] n! (ex−1)k=∑j=0k(kj)(−1)k−jjn=k! S(n,k),[x^n]\,n!\,(e^x-1)^k = \sum_{j=0}^k \binom{k}{j}(-1)^{k-j} j^n = k!\,S(n,k),

the last equality being the (already-established, prerequisite) explicit formula for Stirling numbers of the second kind.

Step 3: unlabel the blocks and sum over kk. To count unordered partitions into exactly kk blocks, divide by k!k! (the number of orderings of kk distinguishable blocks — valid since all kk blocks are automatically distinct as sets, being disjoint and nonempty, so no overcounting from repeated blocks occurs). Hence the EGF of S(n,k)S(n,k) (as a sequence in nn, for fixed kk) is

(ex−1)kk!.\frac{(e^x-1)^k}{k!}.

Summing over all k≥0k \ge 0 (with the k=0k=0 term contributing only at n=0n=0, matching S(0,0)=1S(0,0)=1) gives the EGF of Bn=∑kS(n,k)B_n = \sum_k S(n,k):

B(x)=∑k=0∞(ex−1)kk!=e ex−1,B(x) = \sum_{k=0}^\infty \frac{(e^x-1)^k}{k!} = e^{\,e^x - 1},

where the last equality is just the Taylor series of the exponential function evaluated at ex−1e^x - 1, valid for all real (indeed all complex) xx since ey=∑kyk/k!e^y = \sum_k y^k/k! converges everywhere. Convergence of the outer sum over kk for each fixed xx follows because ex−1e^x - 1 is a fixed real number once xx is fixed, and ∑kyk/k!\sum_k y^k/k! converges absolutely for every real yy.

Step 4: radius of convergence of B(x)B(x) itself. Since eex−1e^{e^x-1} is an entire function (composition of entire functions), its Taylor series ∑nBnxn/n!\sum_n B_n x^n/n! converges for all x∈Cx \in \mathbb{C}; in particular B(x)B(x) has infinite radius of convergence, so the formal manipulations above are also valid as honest analytic identities. ■\blacksquare

∎

Worked examples

Example 1: Computing B6B_6 two independent ways, then cross-checking. Via the Bell recurrence. Using B0,…,B5=1,1,2,5,15,52B_0,\dots,B_5 = 1,1,2,5,15,52:

B6=∑k=05(5k)Bk=(50)(1)+(51)(1)+(52)(2)+(53)(5)+(54)(15)+(55)(52).B_6 = \sum_{k=0}^5 \binom{5}{k}B_k = \binom{5}{0}(1)+\binom{5}{1}(1)+\binom{5}{2}(2)+\binom{5}{3}(5)+\binom{5}{4}(15)+\binom{5}{5}(52).

Computing term by term:

1⋅1=1,5⋅1=5,10⋅2=20,10⋅5=50,5⋅15=75,1⋅52=52.1\cdot 1 = 1,\quad 5\cdot 1 = 5,\quad 10\cdot 2 = 20,\quad 10\cdot 5 = 50,\quad 5\cdot 15 = 75,\quad 1\cdot 52 = 52.

Sum: 1+5+20+50+75+52=2031+5+20+50+75+52 = 203. So B6=203B_6 = 203. Via the Stirling-number sum. The Stirling numbers of the second kind for n=6n=6 are

S(6,1)=1, S(6,2)=31, S(6,3)=90, S(6,4)=65, S(6,5)=15, S(6,6)=1.S(6,1)=1,\ S(6,2)=31,\ S(6,3)=90,\ S(6,4)=65,\ S(6,5)=15,\ S(6,6)=1.

(These follow from the Stirling recurrence S(n,k)=k S(n−1,k)+S(n−1,k−1)S(n,k) = k\,S(n-1,k) + S(n-1,k-1), a prerequisite fact.) Summing:

1+31+90+65+15+1=203.1+31+90+65+15+1 = 203.

Both routes agree: B6=203B_6 = 203, confirming the consistency of the recurrence with the Stirling-sum definition.

Example 2: A concrete labeled partition-counting problem. Suppose a study coordinator must group 55 distinct research participants — labeled P1,…,P5P_1,\dots,P_5 — into an unspecified number of discussion groups, where every participant is in exactly one group, groups have no names or ordering (a "group of {P1,P3}\{P_1,P_3\} and a group of {P2,P4,P5}\{P_2,P_4,P_5\}" is the same arrangement regardless of which is called "group A"), and a group of size 00 is not allowed. How many distinct grouping arrangements are possible? This is exactly B5B_5. From the corollary above, B5=52B_5 = 52. To sanity-check via the defining Stirling-sum route: S(5,1)=1S(5,1)=1 (all together), S(5,2)=15S(5,2)=15, S(5,3)=25S(5,3)=25, S(5,4)=10S(5,4)=10, S(5,5)=1S(5,5)=1 (all singletons), and

1+15+25+10+1=52,1+15+25+10+1 = 52,

matching. As an explicit spot-check, consider k=2k=2 groups: one way to split {P1,…,P5}\{P_1,\ldots,P_5\} into two nonempty groups is {P1}\{P_1\} and {P2,P3,P4,P5}\{P_2,P_3,P_4,P_5\}; another is {P1,P2}\{P_1,P_2\} and {P3,P4,P5}\{P_3,P_4,P_5\}; the full count of such two-block splits is S(5,2)=12(25−2)=15S(5,2) = \tfrac12(2^5-2) = 15, consistent with the Stirling formula S(n,2)=2n−1−1S(n,2) = 2^{n-1}-1 (here 24−1=152^4-1=15). This confirms the pieces feeding into B5=52B_5=52 are individually correct, not just the final sum. ---

The Bell triangle

DefinitionBell triangle

The Bell triangle (also called the Aitken array or Peirce triangle) is the triangular array of integers an,ka_{n,k} for n≥1n \ge 1 and 1≤k≤n1 \le k \le n, defined by:

  • a1,1=1a_{1,1} = 1.
  • an,1=an−1, n−1a_{n,1} = a_{n-1,\,n-1} for n≥2n \ge 2 (the first entry of each new row equals the last entry of the previous row).
  • an,k=an,k−1+an−1,k−1a_{n,k} = a_{n,k-1} + a_{n-1,k-1} for 2≤k≤n2 \le k \le n (each subsequent entry is the sum of the entry to its left and the entry above that one).
TheoremThe Bell triangle computes the Bell numbers

With an,ka_{n,k} as above, for every n≥1n \ge 1:

an,1=Bn−1andan,n=Bn.a_{n,1} = B_{n-1} \quad \text{and} \quad a_{n,n} = B_n.

In particular, the left edge of the triangle (reading a1,1,a2,1,a3,1,…a_{1,1}, a_{2,1}, a_{3,1}, \dots) lists B0,B1,B2,…B_0, B_1, B_2, \dots, and the last entry of row nn is BnB_n.

Proof

We prove by strong induction on nn the joint statement:

P(n):an,1=Bn−1,and for all 1≤k≤n,  an,k=∑j=0k−1(k−1j)Bn−k+j.P(n): \quad a_{n,1} = B_{n-1}, \qquad \text{and for all } 1 \le k \le n,\ \ a_{n,k} = \sum_{j=0}^{k-1}\binom{k-1}{j}B_{n-k+j}.

This refined statement — tracking every entry in row nn, not just the endpoints — is what makes the induction go through cleanly (a direct induction on just the endpoints would not have enough information to advance a row).

Base case n=1n=1. Row 11 has the single entry a1,1=1a_{1,1}=1. We check P(1)P(1): a1,1a_{1,1} should equal B0=1B_0 = 1 ✓, and the sum formula with k=1k=1 gives ∑j=00(00)B1−1+0=B0=1\sum_{j=0}^0 \binom{0}{0}B_{1-1+0} = B_0 = 1 ✓.

Inductive step. Suppose P(n)P(n) holds for some n≥1n \ge 1; we show P(n+1)P(n+1). First entry of row n+1n+1. By definition, an+1,1=an,na_{n+1,1} = a_{n,n}. By the inductive hypothesis P(n)P(n) applied at k=nk=n,

an,n=∑j=0n−1(n−1j)Bn−n+j=∑j=0n−1(n−1j)Bj=Bn,a_{n,n} = \sum_{j=0}^{n-1}\binom{n-1}{j}B_{n-n+j} = \sum_{j=0}^{n-1}\binom{n-1}{j}B_j = B_n,

where the last equality is precisely the Bell recurrence proved above (with nn there playing the role of n−1n-1 here, i.e. B(n−1)+1=∑j=0n−1(n−1j)BjB_{(n-1)+1} = \sum_{j=0}^{n-1}\binom{n-1}{j}B_j). Hence an+1,1=Bn=B(n+1)−1a_{n+1,1} = B_n = B_{(n+1)-1}, confirming the first half of P(n+1)P(n+1). General entry of row n+1n+1, by induction on kk within the row. We show, for 1≤k≤n+11\le k \le n+1,

an+1,k=∑j=0k−1(k−1j)B(n+1)−k+j,a_{n+1,k} = \sum_{j=0}^{k-1}\binom{k-1}{j}B_{(n+1)-k+j},

by induction on kk. The case k=1k=1 is exactly the first-entry computation just done. Suppose the formula holds for row n+1n+1 at position k−1k-1 (where 2≤k≤n+12 \le k \le n+1), i.e.

an+1,k−1=∑i=0k−2(k−2i)B(n+1)−(k−1)+i=∑i=0k−2(k−2i)Bn−k+2+i.a_{n+1,k-1} = \sum_{i=0}^{k-2}\binom{k-2}{i}B_{(n+1)-(k-1)+i} = \sum_{i=0}^{k-2}\binom{k-2}{i}B_{n-k+2+i}.

By the defining recurrence of the triangle,

an+1,k=an+1,k−1+an,k−1.a_{n+1,k} = a_{n+1,k-1} + a_{n,k-1}.

The second summand, by the outer inductive hypothesis P(n)P(n) at position k−1k-1 (valid since k−1≤nk-1 \le n), is

an,k−1=∑i=0k−2(k−2i)Bn−(k−1)+i=∑i=0k−2(k−2i)Bn−k+1+i.a_{n,k-1} = \sum_{i=0}^{k-2}\binom{k-2}{i}B_{n-(k-1)+i} = \sum_{i=0}^{k-2}\binom{k-2}{i}B_{n-k+1+i}.

So

an+1,k=∑i=0k−2(k−2i)Bn−k+2+i+∑i=0k−2(k−2i)Bn−k+1+i.a_{n+1,k} = \sum_{i=0}^{k-2}\binom{k-2}{i}B_{n-k+2+i} + \sum_{i=0}^{k-2}\binom{k-2}{i}B_{n-k+1+i}.

Reindex the first sum by j=i+1j = i+1 (running j=1,…,k−1j=1,\dots,k-1) and the second by j=ij=i (running j=0,…,k−2j=0,\dots,k-2):

an+1,k=∑j=1k−1(k−2j−1)Bn−k+1+j+∑j=0k−2(k−2j)Bn−k+1+j.a_{n+1,k} = \sum_{j=1}^{k-1}\binom{k-2}{j-1}B_{n-k+1+j} + \sum_{j=0}^{k-2}\binom{k-2}{j}B_{n-k+1+j}.

Combining the two sums termwise using Pascal's rule (k−2j−1)+(k−2j)=(k−1j)\binom{k-2}{j-1}+\binom{k-2}{j} = \binom{k-1}{j} for the overlapping range j=1,…,k−2j=1,\dots,k-2, and noting the j=0j=0 term appears only in the second sum (coefficient (k−20)=1=(k−10)\binom{k-2}{0}=1=\binom{k-1}{0}) and the j=k−1j=k-1 term appears only in the first sum (coefficient (k−2k−2)=1=(k−1k−1)\binom{k-2}{k-2}=1=\binom{k-1}{k-1}), we get

an+1,k=∑j=0k−1(k−1j)Bn−k+1+j=∑j=0k−1(k−1j)B(n+1)−k+j,a_{n+1,k} = \sum_{j=0}^{k-1}\binom{k-1}{j}B_{n-k+1+j} = \sum_{j=0}^{k-1}\binom{k-1}{j}B_{(n+1)-k+j},

exactly the claimed formula for row n+1n+1, position kk. This completes the induction on kk, and hence establishes the full statement P(n+1)P(n+1).

Extracting the endpoint claim. Setting k=n+1k=n+1 in the just-proved row formula for P(n+1)P(n+1):

an+1,n+1=∑j=0n(nj)B(n+1)−(n+1)+j=∑j=0n(nj)Bj=Bn+1,a_{n+1,n+1} = \sum_{j=0}^{n}\binom{n}{j}B_{(n+1)-(n+1)+j} = \sum_{j=0}^n \binom{n}{j}B_j = B_{n+1},

again by the Bell recurrence. This confirms the last entry of row n+1n+1 is Bn+1B_{n+1}, matching the theorem statement (shifted by one index from PP's bookkeeping, which used Bn−1B_{n-1} for the first entry of row nn — here an+1,n+1=Bn+1a_{n+1,n+1}=B_{n+1}, consistent with "last entry of row mm is BmB_m" at m=n+1m=n+1). By the principle of strong (here, ordinary, nested) induction, P(n)P(n) holds for all n≥1n \ge 1, and the two extracted facts an,1=Bn−1a_{n,1}=B_{n-1}, an,n=Bna_{n,n}=B_n hold for all n≥1n\ge1. ■\blacksquare

∎
Figure
The Bell triangle through row 5, left edge = Bell numbers 1,1,2,5,15,52
Bell triangle: aₙ,₁ = Bₙ₋₁ (left edge), aₙ,ₙ = Bₙ (diagonal) 1 1 2 2 3 5 5 7 10 15 15 20 27 37 52 blue = left edge (Bₙ₋₁) red = row-end diagonal (Bₙ)
CounterexampleWhy finiteness of the ground set is needed

The theorem's implicit hypothesis is that [n][n] is a finite set; drop this and the Bell number is no longer well-defined as a natural number, and the recurrence's derivation (which relies on choosing a specific "largest" or "last" element and a binomial coefficient count) breaks down entirely. Consider X=N={1,2,3,… }X = \mathbb{N} = \{1, 2, 3, \dots\}, a countably infinite set. The number of partitions of N\mathbb{N} into nonempty blocks is not a finite number at all — it is (as a cardinality) 2ℵ02^{\aleph_0}, the cardinality of the continuum. Indeed, for each subset S⊆NS \subseteq \mathbb{N} with both SS and its complement infinite, the two-block partition {S,N∖S}\{S, \mathbb{N}\setminus S\} is distinct for distinct SS, and there are 2ℵ02^{\aleph_0} such subsets SS (up to the identification S↔N∖SS \leftrightarrow \mathbb{N}\setminus S, which only divides the count by 22, an operation invisible at infinite cardinalities). So already the two-block partitions alone number 2ℵ02^{\aleph_0}, an uncountable cardinal, not an integer. The proof of the Bell recurrence crucially used: (a) the existence of a distinguished last element n+1n+1 outside [n][n], and (b) that "the number of elements outside the block of n+1n+1" is a well-defined finite number k∈{0,…,n}k \in \{0,\ldots,n\} so that a finite sum ∑k=0n\sum_{k=0}^n makes sense. For X=NX=\mathbb{N} there is no last element, and a block containing "11" could contain infinitely many other elements, leaving infinitely many outside — the induction has no base case and the sum ∑k=0n(nk)Bk\sum_{k=0}^n \binom{n}{k}B_k has no analogue with finitely many terms. This shows finiteness of the ground set is not a technical nicety but load-bearing: without it, BnB_n is not even a natural number.

Scope, edge cases & common traps

SituationWhat happensCorrect handling
n=0n=0B0=1B_0 = 1 (one partition: the empty collection of blocks)Always include this base case; forgetting it shifts the entire recurrence
Blocks vs. ordered blocksBnB_n counts unordered partitionsDo not confuse with ∑kk! S(n,k)\sum_k k!\,S(n,k), the count of ordered set partitions (surjections composed with orderings), which grows much faster
Empty blocksNot allowed by definitionIf empty blocks were allowed, every partition of [n][n] into "at most kk" parts would be miscounted; always use nonempty blocks in the Stirling/Bell framework
Large nn by handDirect Stirling-sum needs all S(n,k)S(n,k)Bell triangle is more efficient for hand computation: pure integer addition, no binomial coefficients needed
Infinite ground setsBnB_n undefined / not a natural numberSee the counterexample: finiteness of [n][n] is essential

The mathematician behind it

Origins · 1 minEric Temple Bell and how this was discovered
ET
Eric Temple Bell
1883–1960 · Scottish-American number theorist and popular writer on mathematics

Eric Temple Bell was a Scottish-born mathematician who spent most of his career at the California Institute of Technology, working primarily in number theory and the theory of partitions, while also becoming widely known for his popular (if historically embellished) book Men of Mathematics. Although the numbers that bear his name had been studied earlier — notably by the American logician Charles Sanders Peirce — Bell's systematic 1934 papers on "exponential numbers" cemented both the notation and the modern combinatorial framing that ties the sequence to set partitions and to the function eex−1e^{e^x-1}.

History
- 1877: Charles Sanders Peirce studies the array now called the Bell triangle (sometimes named the Peirce triangle in his honor) in work on logic and combinatorics.
- 1934: Eric Temple Bell publishes "Exponential Numbers," establishing the modern combinatorial identity connecting these numbers to set partitions and to eex−1e^{e^x-1}.
- 1938: Bell further develops "exponential polynomials," linking the sequence explicitly to the Stirling numbers of the second kind via the sum Bn=∑kS(n,k)B_n = \sum_k S(n,k).
- 1968: The recursive triangle method for hand-computing Bell numbers is popularized and analyzed further, sometimes attributed independently to Alexander Aitken.
- 20th century onward: The Bell numbers become a standard example in the theory of exponential generating functions and umbral calculus, and OEIS sequence A000110 catalogs the sequence with extensive cross-references to combinatorial identities.
Is BnB_n the same as the number of ways to partition nn into positive integer parts (integer partitions)?

No — this is one of the most common confusions in the area. The number of integer partitions of nn (ways to write nn as an unordered sum of positive integers, e.g. 4=3+1=2+2=2+1+1=1+1+1+14 = 3+1 = 2+2 = 2+1+1 = 1+1+1+1, giving 55 ways) is a different sequence, denoted p(n)p(n), with p(4)=5p(4)=5. The Bell number BnB_n counts partitions of a labeled set of nn elements into unlabeled nonempty blocks, and the labels matter: B4=15≠p(4)=5B_4 = 15 \ne p(4) = 5. Every set partition of [n][n] does determine an integer partition of nn (the multiset of block sizes), but many different set partitions can share the same block-size profile, which is exactly why BnB_n is generally much larger than p(n)p(n).

How fast do the Bell numbers grow?

Very fast — faster than exponential in nn. An asymptotic estimate, due to Bell himself and refined by others using the saddle-point method on the generating function eex−1e^{e^x-1}, gives

ln⁡Bn∼nln⁡n−nln⁡ln⁡n+n+O ⁣(nln⁡n),\ln B_n \sim n \ln n - n \ln \ln n + n + O\!\left(\frac{n}{\ln n}\right),

which grows faster than n!n! divided by any fixed exponential factor but slower than n!n! itself for large nn in a precise ratio sense tied to ln⁡n\ln n. Concretely, the first several values 1,1,2,5,15,52,203,877,4140,21147,…1,1,2,5,15,52,203,877,4140,21147,\dots already show super-exponential-looking growth, and by n=10n=10, B10=115975B_{10}=115975, dwarfing 210=10242^{10}=1024.

Does the Bell triangle need the binomial coefficients or factorials at all?

No — that is precisely its practical advantage. Once row 11 starts with the single entry 11, every subsequent entry is obtained by a single addition: the new entry equals the entry to its left plus the entry diagonally above-left. There is no multiplication, no binomial coefficient, and no factorial anywhere in the construction, even though the array provably reproduces sums involving binomial coefficients (as the proof shows via the auxiliary formula for an,ka_{n,k}). This makes the Bell triangle an efficient by-hand or introductory-programming method for tabulating Bell numbers up to moderate nn.

How does the Bell number relate to the Stirling numbers of the second kind precisely?

The Bell number is the row sum of the Stirling triangle: Bn=∑k=0nS(n,k)B_n = \sum_{k=0}^n S(n,k), where S(n,k)S(n,k) counts partitions of [n][n] into exactly kk nonempty blocks. Every partition of [n][n] has some definite number of blocks between 11 and nn (or, for n=0n=0, the empty partition with 00 blocks), so summing S(n,k)S(n,k) over all possible block counts recovers the unrestricted total. This is not a coincidence or approximation; it is an exact identity following from partitioning the set of all set-partitions of [n][n] by their number of blocks, a genuine partition of the "space of partitions" itself.

Can the Bell recurrence be proved using generating functions instead of the combinatorial argument given here?

Yes, and it is instructive to see both. Differentiating B(x)=eex−1B(x) = e^{e^x-1} gives B′(x)=ex⋅eex−1=exB(x)B'(x) = e^x \cdot e^{e^x-1} = e^x B(x), so matching coefficients of xn/n!x^n/n! on both sides (using the product rule for EGFs, i.e. multiplying the series for ex=∑xk/k!e^x = \sum x^k/k! and B(x)=∑Bkxk/k!B(x)=\sum B_k x^k/k!) yields exactly Bn+1=∑k=0n(nk)BkB_{n+1} = \sum_{k=0}^n \binom{n}{k}B_k. This generating-function proof is shorter but relies on already having established B(x)=eex−1B(x)=e^{e^x-1}, whereas the combinatorial proof given as the main theorem here is logically prior and self-contained, which is why it is presented as the primary derivation.

What is the "ordered Bell number" and how is it different?

The ordered Bell number (or Fubini number) a(n)a(n) counts partitions of [n][n] into nonempty blocks that are then arranged in a linear order — equivalently, the number of ways to rank nn competitors allowing ties. It satisfies a(n)=∑k=0nk! S(n,k)a(n) = \sum_{k=0}^n k!\,S(n,k), with EGF 12−ex\dfrac{1}{2-e^x}, and grows even faster than BnB_n (for instance a(3)=13a(3)=13 versus B3=5B_3=5, since the two size-{1,2}\{1,2\}-type partitions of [3][3] each admit 2!=22! = 2 orderings of their two blocks). It is a close relative of the Bell numbers but must not be conflated with them, since the Bell numbers explicitly discard block order.

Before this

Where this leads