In combinatorial mathematics, the Bell numbers count the possible partitions of a set. These numbers have been studied by mathematicians since the 19th century, and their roots go back to medieval Japan. In an example of Stigler's law of eponymy, they are named after Eric Temple Bell, who wrote about them in the 1930s. The Bell numbers are denoted Bn, where n is an integer greater than or equal to zero. Starting with B0=B1=1, the first few Bell numbers are
1,1,2,5,15,52,203,877,4140,… (sequence A000110 in the OEIS). The Bell number Bn counts the different ways to partition a set that has exactly n elements, or equivalently, the equivalence relations on it. Bn also counts the different rhyme schemes for n-line poems. As well as appearing in counting problems, these numbers have a different interpretation, as moments of probability distributions. In particular, Bn is the n-th moment of a Poisson distribution with mean 1.
Counting
Set partitions
In general, Bn is the number of partitions of a set of size n. A partition of a set S is defined as a family of nonempty, pairwise disjoint subsets of S whose union is S. For example, B3=5 because the 3-element set {a,b,c} can be partitioned in 5 distinct ways:
{{a},{b},{c}}, {{a},{b,c}}, {{b},{a,c}}, {{c},{a,b}}, {{a,b,c}}. As suggested by the set notation above, the ordering of subsets within the family is not considered; ordered partitions are counted by a different sequence of numbers, the ordered Bell numbers. B0 is 1 because there is exactly one partition of the empty set. This partition is itself the empty set; it can be interpreted as a family of subsets of the empty set, consisting of zero subsets. It is vacuously true that all of the subsets in this family are non-empty subsets of the empty set and that they are pairwise disjoint subsets of the empty set, because there are no subsets to have these unlikely properties. The partitions of a set correspond one-to-one with its equivalence relations. These are binary relations that are reflexive, symmetric, and transitive. The equivalence relation corresponding to a partition defines two elements as being equivalent when they belong to the same partition subset as each other. Conversely, every equivalence relation corresponds to a partition into equivalence classes. Therefore, the Bell numbers also count the equivalence relations.
Factorizations If a number N is a squarefree positive integer, meaning that it is the product of some number n of distinct prime numbers, then Bn gives the number of different multiplicative partitions of N. These are factorizations of N into numbers greater than one, treating two factorizations as the same if they have the same factors in a different order. For instance, 30 is the product of the three primes 2, 3, and 5, and has B3 = 5 factorizations:
30=2×15=3×10=5×6=2×3×5
Rhyme schemes The Bell numbers also count the rhyme schemes of an n-line poem or stanza. A rhyme scheme describes which lines rhyme with each other, and so may be interpreted as a partition of the set of lines into rhyming subsets. Rhyme schemes are usually written as a sequence of Roman letters, one per line, with rhyming lines given the same letter as each other, and with the first lines in each rhyming set labeled in alphabetical order. Thus, the 15 possible four-line rhyme schemes are AAAA, AAAB, AABA, AABB, AABC, ABAA, ABAB, ABAC, ABBA, ABBB, ABBC, ABCA, ABCB, ABCC, and ABCD.
Permutations The Bell numbers come up in a card shuffling problem mentioned in the addendum to Gardner 1978. If a deck of n cards is shuffled by repeatedly removing the top card and reinserting it anywhere in the deck (including its original position at the top of the deck), with exactly n repetitions of this operation, then there are nn different shuffles that can be performed. Of these, the number that return the deck to its original sorted order is exactly Bn. Thus, the probability that the deck is in its original order after shuffling it in this way is Bn/nn, which is significantly larger than the 1/n! probability that would describe a uniformly random permutation of the deck. Related to card shuffling are several other problems of counting special kinds of permutations that are also answered by the Bell numbers. For instance, the nth Bell number equals the number of permutations on n items in which no three values that are in sorted order have the last two of these three consecutive. In a notation for generalized permutation patterns where values that must be consecutive are written adjacent to each other, and values that can appear non-consecutively are separated by a dash, these permutations can be described as the permutations that avoid the pattern 1-23. The permutations that avoid the generalized patterns 12-3, 32-1, 3-21, 1-32, 3-12, 21-3, and 23-1 are also counted by the Bell numbers. The permutations in which every 321 pattern (without restriction on consecutive values) can be extended to a 3241 pattern are also counted by the Bell numbers. However, the Bell numbers grow too quickly to count the permutations that avoid a pattern that has not been generalized in this way: by the (now proven) Stanley–Wilf conjecture, the number of such permutations is singly exponential, and the Bell numbers have a higher asymptotic growth rate than that.
Triangle scheme for calculations
The Bell numbers can easily be calculated by creating the so-called Bell triangle, also called Aitken's array or the Peirce triangle after Alexander Aitken and Charles Sanders Peirce.
Start with the number one. Put this on a row by itself. (x0,1=1) Start a new row with the rightmost element from the previous row as the leftmost number (xi,1←xi−1,r where r is the last element of (i − 1)-th row) Determine the numbers not on the left column by taking the sum of the number to the left and the number above the number to the left, that is, the number diagonally up and left of the number we are calculating (xi,j←xi,j−1+xi−1,j−1) Repeat step three until there is a new row with one more number than the previous row (do step 3 until j=r+1) The number on the left hand side of a given row is the Bell number for that row. (Bi←xi,1) Here are the first five rows of the triangle constructed by these rules: 1122355710151520273752 The Bell numbers appear on both the left and right sides of the triangle.
Properties
Summation formulas The Bell numbers satisfy a recurrence relation involving binomial coefficients:
… excerpt ends here. Continue reading the full article.



![Bell number: The traditional Japanese symbols for the 54 chapters of the Tale of Genji are based on the 52 ways of partitioning five elements (the two red symbols represent the same partition, and the green symbol is added for reaching 54).[28]](https://thumb.wikimedia.org/wikipedia/commons/thumb/a/ac/Genji_chapter_symbols_groupings_of_5_elements.svg/330px-Genji_chapter_symbols_groupings_of_5_elements.svg.png?utm_source=en.wikipedia.org&utm_campaign=parser&utm_content=thumbnail)