Ordered Bell Number Calculator
Sequences
- The ordered Bell numbers (the Fubini numbers) count weak orders: the rankings of n labelled items in which ties are allowed, so every item gets a rank but several can share one.
- Summing over the possible numbers of distinct ranks k - choose a partition into k blocks with the Stirling numbers, then order the blocks in k! ways - gives a(5) = 541.
- The growth ratio a(5) / a(4) = 7.2133: allowing ties multiplies the plain permutations n! several times over, and the factor keeps growing with n.
- Weak orders are everywhere rankings allow ties - race results with dead heats, preference rankings, and the preferential arrangements of combinatorics are all counted by the Fubini numbers.
An ordered Bell number - also called a Fubini number - counts the weak orders on n labelled items: the rankings in which ties are allowed. Three runners can finish in 13 ranked patterns, not 6, because dead heats multiply the possibilities: a(3) = 13 counts every way the podium can be shared.
This ordered Bell number calculator evaluates a(n) exactly and lists the sequence from a(0): 1, 1, 3, 13, 75, 541, 4,683, 47,293. The anchor values are a(5) = 541 and a(10) = 102,247,563 - already past a hundred million at ten items, because allowing ties multiplies the plain permutations several times over.
Weak orders are the mathematics of real rankings: race results with dead heats, preference ballots where voters may rank candidates equally, and the preferential arrangements of combinatorics. The ordered Bell numbers count them all, and their formula - a sum of k! x S(n, k) over the possible numbers of distinct ranks - is a small masterpiece of counting in two stages.
Worked examples
a(5)
(Value at n · 5)
| Ordered Bell number a(5) | 541 |
| weak orders of n labelled items | 541 |
| a(4) for comparison | 75 |
| growth ratio a(n) / a(n-1) | 7.2133 |
a(10)
(Value at n · 10)
| Ordered Bell number a(10) | 102,247,563 |
| weak orders of n labelled items | 102,247,563 |
| a(9) for comparison | 7,087,261 |
| growth ratio a(n) / a(n-1) | 14.4270 |
First 8 ordered Bell numbers
(First n values · 8)
| First 8 ordered Bell numbers (from a(0)) | 1, 1, 3, 13, 75, 541, 4,683, 47,293 |
| last term | 47,293 |
| counts | weak orders (rankings with ties) |
| ordinary Bell number at the same n, for contrast | 877 |
Rankings with ties allowed
A weak order assigns every item a rank but lets ranks be shared. For 3 items the count is 13: the 6 strict orderings, the patterns with exactly one tie for first or last... enumerate them as: all distinct (6), exactly two tied (6 patterns - choose the tied pair and whether it sits first or last... 3 pairs x 2 positions), and all three tied (1) - total 13. The calculator's a(3) = 13 is small enough to verify by this hand count.
That hand count is the formula in embryo. First partition the items into k non-empty tied blocks - counted by the Stirling numbers S(n, k) - then order the k blocks, in k! ways. Summing over k gives a(n), and the calculator performs exactly that sum.
- a(3) = 13: 6 strict, 6 with one tie, 1 all-tied
- Count = sum over k of k! x S(n, k)
- Ties multiply rankings several times over
The Stirling-number formula
For n = 5 the sum runs over k = 1 to 5 distinct ranks: S(5, 1) x 1! + S(5, 2) x 2! + S(5, 3) x 3! + S(5, 4) x 4! + S(5, 5) x 5! = 1 + 30 + 150 + 240 + 120 = 541. Each term is a complete sub-count - the rankings with exactly that many distinct ranks - so the formula decomposes the total meaningfully rather than merely computing it.
The calculator uses this formula directly, with the Stirling numbers built by their recurrence. Every intermediate is an integer, the arithmetic is exact, and the decomposition by k is available to anyone who wants to audit a value by hand at small n.
- a(5) = 1 + 30 + 150 + 240 + 120 = 541
- Each term counts rankings with exactly k distinct ranks
- Stirling numbers by recurrence; exact throughout
How fast Fubini numbers grow
The sequence from a(0) - 1, 1, 3, 13, 75, 541, 4,683, 47,293 - reaches a(10) = 102,247,563. The growth ratio a(n) / a(n - 1) is reported in value mode, and it keeps climbing: asymptotically the ratio behaves like n / ln 2, faster than any constant factor, because the typical weak order has about n / ln 2 distinct ranks, each contributing ordering freedom.
Compare the ordinary Bell numbers, which count partitions without ordering the blocks: at n = 7 the Bell number is 877 against a(7) = 47,293 ordered versions. Ordering the blocks is worth a factor of fifty already at seven items - the two sequences answer different questions and diverge accordingly.
- a(10) = 102,247,563
- Growth ratio climbs like n / ln 2
- Bell(7) = 877 vs a(7) = 47,293 - ordering matters
Where weak orders appear
Any ranking that permits equality is a weak order. Horse-race finishes with dead heats are the classical picture - the numbers are named for Guido Fubini, who studied them in just such a setting - and modern instances include tied league standings, equally ranked search results, and preference schedules in voting theory where indifference is allowed.
In combinatorics the same count answers for preferential arrangements and ordered set partitions - the same objects under other names. Wherever 'rank, allowing ties' is the question, a(n) is the answer.
- Dead heats, tied standings, indifferent ballots
- Also called preferential arrangements
- Named for Guido Fubini
Ordered vs ordinary Bell numbers
The ordinary Bell number B(n) counts set partitions - who is grouped with whom, with no order among the groups. The ordered Bell number refines each partition by ranking its blocks, multiplying the contribution of a k-block partition by k!. That single extra factor is the whole difference between the sequences, and it is why a(n) >= B(n) always, with equality only in trivial cases.
The list mode prints the ordinary Bell number at the same index for contrast, so the refinement factor is visible rather than asserted. At the top of the first-eight list the contrast is 877 against 47,293 - a fifty-fold difference from one factorial factor per block count.
- Bell: partitions; ordered Bell: partitions with ranked blocks
- Difference is exactly the k! factor per block count
- Contrast printed alongside in list mode
Computing the values
Two routes compute a(n): the Stirling sum used here, and a binomial recurrence that builds each value from all previous ones by choosing which items share the bottom rank - a(n) = the sum over k of C(n, k) x a(n - k), with a(0) = 1. The routes agree: the calculator's values were cross-checked between the Stirling sum and the recurrence before publication.
Exactness is maintained with integer arithmetic up to n = 15, beyond which the values outgrow the page's exact-integer guarantee. Within range, a(10) = 102,247,563 is exact to the unit.
- Stirling sum and binomial recurrence agree
- Cross-checked before publication
- Exact for n up to 15
A recurrence for hand computation
For hand work the binomial recurrence is the friendliest route: a(n) = the sum over k of C(n, k) x a(n - k), choosing which items occupy the bottom rank and ranking the rest recursively. Starting from a(0) = 1 it gives a(1) = 1, a(2) = 3, a(3) = 13 in a few lines - the same values the Stirling sum produces, reached from the opposite direction.
The calculator's values were cross-checked between the two routes before publication, because sequences defined by a sum over Stirling numbers are easy to mis-index by one. When a(5) = 541 emerges from both the k! S(n, k) sum and the recurrence, the indexing is right.
- Recurrence: choose the bottom rank, recurse
- a(3) = 13 by hand in a few lines
- Two routes cross-checked against mis-indexing
Using the calculator
Value mode gives a(n) with a(n - 1) and the growth ratio - the right view for a single ranking count. List mode gives the run from a(0), the right view for spotting the sequence or comparing against Bell numbers at the same index.
If your count involves ties, this is the page; if ties are forbidden, you want factorials (strict orders) or Bell numbers (unranked groups). Choosing between the three is the modelling decision - the calculator handles the arithmetic for the tied case.
- Value mode: a(n), previous, growth ratio
- List mode: the run from a(0) with Bell contrast
- Ties allowed: ordered Bell; forbidden: factorial or Bell
FAQs
What is an ordered Bell number?
The number of weak orders - rankings with ties allowed - on n labelled items. They are also called Fubini numbers.
What is a(5)?
a(5) = 541 weak orders on 5 items.
What are the first ordered Bell numbers?
From a(0): 1, 1, 3, 13, 75, 541, 4,683, 47,293.
What is a(10)?
a(10) = 102,247,563.
How are ordered Bell numbers computed?
As the sum over k of k! x S(n, k): partition the items into k tied blocks with the Stirling numbers S(n, k), then order the blocks in k! ways.
Why are they called Fubini numbers?
They are named for Guido Fubini; a(3) = 13 counts the rankings of 3 items once ties are allowed, against only 6 strict orderings.