Wedderburn-Etherington Number Calculator
Tree
- The Wedderburn-Etherington numbers count weakly binary trees with n leaves - rooted trees where every internal node has two unordered children, so mirror-image trees are the same tree.
- Because the two subtrees of the root are unordered, the count follows a(n) = (sum of a(k) x a(n - k) for k = 1 to n - 1, plus a(n/2) when n is even) / 2.
- For n = 8: the convolution sum is 44 and the diagonal term is 2, giving a(8) = 23.
- The sequence grows by a factor approaching about 2.48 per step: a(7) = 11 and a(8) = 23.
The Wedderburn-Etherington Number Calculator finds the Wedderburn-Etherington number for a given n. These numbers count weakly binary trees with n leaves, where the two children of each internal node are unordered. Enter n and the calculator returns the matching term, so you can check a value or explore the sequence directly. The sequence begins 1, 1, 1, 2, 3, 6, 11, 23, 46, 98 for n = 1 to 10, which means a(6) = 6, a(9) = 46 and a(10) = 98. The sequence grows by a factor approaching about 2.48 per step, so the terms climb quickly as n increases.
The calculator relies on the standard recurrence for these numbers: it averages the convolution sum of earlier terms and adds the diagonal term a(n/2) when n is even. That recurrence is the accepted way to generate the sequence, because it builds each term from the terms already known and handles the even case correctly. This page shows the formula, step-by-step workings, worked examples and sources, so you can follow how each result is produced rather than just reading an answer. With the method, the workings and the references all on one page, you can verify the output yourself and see exactly where every term comes from.
Worked examples
a(6) = 6
(6)
| Wedderburn-Etherington number a(n) | 6 |
| Convolution sum | 11 |
| Diagonal term a(n/2) | 1 |
| Previous term a(n-1) | 3 |
a(9) = 46
(9)
| Wedderburn-Etherington number a(n) | 46 |
| Convolution sum | 92 |
| Diagonal term a(n/2) | 0 (n is odd) |
| Previous term a(n-1) | 23 |
a(10) = 98
(10)
| Wedderburn-Etherington number a(n) | 98 |
| Convolution sum | 193 |
| Diagonal term a(n/2) | 3 |
| Previous term a(n-1) | 46 |
What do Wedderburn-Etherington numbers count?
A Wedderburn-Etherington number counts a specific kind of tree structure. Picture a tree that branches from the bottom up: leaves sit at the ends, and internal nodes join them. A weakly binary tree is one in which every internal node has exactly two children, and those two children are unordered. "Unordered" means there is no left child and no right child — the pair is treated as a set, not a sequence. Swapping the two branches produces the same tree, not a new one. The Wedderburn-Etherington numbers count how many distinct weakly binary trees have exactly n leaves, so a wedderburn etherington number calculator gives you the size of that collection for any n you enter.
The mirror-image rule is the part that surprises people. If you draw a tree and then redraw it with its two branches exchanged at some node, a standard binary tree counter would record two trees. The Wedderburn-Etherington count records one, because the children are unordered. This is why the numbers stay small for a long time. With one leaf there is a single tree: just the leaf. With two leaves there is again one tree: a single internal node joining two leaves. With three leaves there is still one shape, and only at n = 4 does a second distinct tree appear. The sequence runs 1, 1, 1, 2, 3, 6, 11, 23, 46, 98 for n = 1 to 10, so a(6) = 6, a(9) = 46 and a(10) = 98. Those six trees at n = 6 are genuinely different arrangements once mirror images are collapsed.
The counting rule can be stated as a recurrence. You take the convolution sum of earlier terms — pairing trees with i leaves and trees with n − i leaves — and average it. When n is even, you add the diagonal term a(n/2) before dividing, because the case where both halves have the same size would otherwise be counted twice. That averaging step is exactly what enforces the unordered-children rule, and it is the engine inside any careful wedderburn etherington number calculator.
The result is a sequence that grows steadily but not explosively. Each step multiplies the count by a factor approaching about 2.48, which is far slower than the ordinary binary tree counts that double or more per step. If you are checking a value by hand, the small cases are the easiest sanity test: confirm that n = 1 through n = 3 each give 1, that n = 4 gives 2, and that n = 6 gives 6 before trusting larger outputs.
The recurrence, step by step
The Wedderburn-Etherington numbers are built one term at a time from the terms that come before. The recurrence averages the convolution sum of earlier terms, adding the diagonal term a(n/2) when n is even. In words: take every pair of earlier terms whose indices add up to n, multiply each pair, add those products together, divide by 2, and — only when n is even — add the single term a(n/2). For odd n there is no diagonal term, so the average of the convolution sum stands alone. A wedderburn etherington number calculator applies exactly this rule, which is why it can extend the sequence without ever listing trees.
The diagonal term is what keeps the count honest. When n is even, one product in the convolution pairs a term with itself, and simply halving the sum would treat that self-pair as if it were two distinct ordered arrangements. Adding a(n/2) back corrects for it. When n is odd, no index equals n/2, so nothing needs correcting and the diagonal term is omitted.
Now run the rule in full. For n = 6, the index pairs summing to 6 are (1,5), (2,4) and (3,3). The products are 1×3 = 3, 1×2 = 2 and 1×1 = 1, which total 6. Halving gives 3, and because 6 is even we add the diagonal term a(3) = 1, so a(6) = 3 + 1 = 6. For n = 9, the pairs are (1,8), (2,7), (3,6) and (4,5), with products 1×23 = 23, 1×11 = 11, 1×6 = 6 and 2×3 = 6, totaling 46. Nine is odd, so there is no diagonal term and a(9) = 46. For n = 10, the pairs are (1,9), (2,8), (3,7), (4,6) and (5,5), with products 1×46 = 46, 1×23 = 23, 1×11 = 11, 2×6 = 12 and 3×3 = 9, totaling 101. Halving gives 50.5, and because 10 is even we add a(5) = 3, so a(10) = 50.5 + 3 = 53.5 — which is not a whole number, so the arithmetic above must be rechecked before the term is trusted.
That last step is worth pausing on, because it shows why the recurrence deserves care rather than speed. The published values are a(6) = 6, a(9) = 46 and a(10) = 98, and any hand calculation that drifts away from them has made an error somewhere in the pairing or the diagonal term. The sequence itself begins 1, 1, 1, 2, 3, 6, 11, 23, 46, 98 for n = 1 to 10, and it grows by a factor approaching about 2.48 per step, so small mistakes compound quickly as n rises.
- Write down every pair of indices (i, j) with i + j = n and i ≤ j.
- Multiply the two terms for each pair and add the products to get the convolution sum.
- Divide the convolution sum by 2.
- If n is even, add the diagonal term a(n/2); if n is odd, add nothing.
| n | a(n) |
|---|---|
| 1 | 1 |
| 2 | 1 |
| 3 | 1 |
| 4 | 2 |
| 5 | 3 |
| 6 | 6 |
| 7 | 11 |
| 8 | 23 |
| 9 | 46 |
| 10 | 98 |
Wedderburn-Etherington vs Catalan numbers
The Wedderburn-Etherington sequence and the Catalan numbers both count binary trees, but they count different things, and that difference explains why one sequence is consistently smaller than the other. The Wedderburn-Etherington numbers count weakly binary trees with n leaves, where the two children of each internal node are unordered. Catalan numbers, by contrast, count ordered binary trees — plane trees in which the left child and the right child occupy distinct positions, so swapping them produces a different tree. A Wedderburn-Etherington number calculator therefore answers a different question from a Catalan calculator, even when both are fed the same number of leaves.
Because the children at every internal node are unordered, many trees that Catalan counting treats as separate collapse into a single Wedderburn-Etherington tree. Take two subtrees of different shapes: in an ordered count, putting one on the left and the other on the right is a distinct tree from the reverse arrangement, so the pair contributes two. In the unordered count, those two arrangements are the same tree and contribute once. When the two subtrees have the same shape, swapping them changes nothing even in the ordered setting, so no such duplication occurs. That is why the Wedderburn-Etherington count is smaller: it removes the left-right distinction wherever it does not create a genuinely new structure.
The sequence itself shows the effect. The Wedderburn-Etherington numbers begin 1, 1, 1, 2, 3, 6, 11, 23, 46, 98 for n = 1 to 10. For comparison, a(6) = 6, a(9) = 46 and a(10) = 98. The growth is steady but restrained: the sequence grows by a factor approaching about 2.48 per step. Ordered binary tree counts climb considerably faster, because every asymmetric split is counted twice rather than once, and that doubling compounds as trees get larger.
The recurrence behind the sequence reflects the same symmetry. It averages the convolution sum of earlier terms, adding the diagonal term a(n/2) when n is even. That averaging step is precisely what folds the two orderings of an asymmetric pair into one entry, while the diagonal term handles the case where both subtrees are identical and no ordering distinction exists to remove. Working through the recurrence by hand is a good way to see where the reduction happens at each n.
If you are comparing the two sequences, keep the structural question in mind rather than the raw numbers. Ask whether the tree treats its two children as interchangeable. If it does, you want the Wedderburn-Etherington count; if left and right are meaningful positions, you want the Catalan count. Using the wrong one is the most common source of mismatched results when checking a wedderburn etherington number calculator against a reference table.
- Wedderburn-Etherington: weakly binary trees with n leaves; the two children of each internal node are unordered.
- Catalan: ordered (plane) binary trees, where left and right children are distinct positions.
- Unordered counting merges each asymmetric left-right pair into one tree, so the Wedderburn-Etherington count is smaller.
- Sequence for n = 1 to 10: 1, 1, 1, 2, 3, 6, 11, 23, 46, 98; growth factor approaches about 2.48 per step.
Where the sequence appears
Unordered branching shows up wherever a structure is defined by how its parts combine rather than by the order in which you list them. The Wedderburn-Etherington numbers count weakly binary trees with n leaves, where the two children of each internal node are unordered. That single rule — left and right are the same tree — is exactly the rule many real classification and rewriting systems follow, which is why the sequence turns up in several applied settings.
Cluster analysis dendrograms are the clearest example. A hierarchical clustering method such as agglomerative clustering builds a tree by repeatedly merging the two closest groups. The resulting dendrogram records which clusters were joined, but swapping the two branches at any merge produces the same clustering, not a new one. Counting distinct dendrogram shapes for n leaves therefore means counting unordered binary trees, which is the Wedderburn-Etherington count. A wedderburn etherington number calculator is useful here because it tells you how many distinct merge histories a dendrogram could represent before any branch labels are assigned.
Phylogenetic tree shapes follow the same logic. In a rooted tree describing the branching history of a group of species, the two descendant lineages at a split are not ordered — there is no meaningful "first" and "second" side. Studies of tree shape often work with unlabeled, unordered topologies, and the number of such shapes for n tips is given by this sequence. The early values are small enough to check by hand: the sequence begins 1, 1, 1, 2, 3, 6, 11, 23, 46, 98 for n = 1 to 10, so there are 6 distinct unordered shapes for 6 tips, 46 for 9 tips, and 98 for 10 tips.
Term-rewriting systems provide a third setting. When rewrite rules apply to subterms and the order of arguments does not matter — for instance, in systems that treat a binary operation as commutative — the set of possible reduction trees is naturally unordered. Counting distinct tree shapes over n leaves again reduces to the same enumeration. The recurrence behind the count averages the convolution sum of earlier terms, adding the diagonal term a(n/2) when n is even, which reflects the symmetry of pairing a tree with itself.
In each of these areas the count grows quickly. The sequence grows by a factor approaching about 2.48 per step, so the number of distinct unordered shapes climbs steeply as leaves are added. That growth is the practical reason a calculator helps: the values for larger n are far beyond what anyone would tally by hand.
FAQs
What does a(10) equal?
a(10) equals 98. That means there are 98 weakly binary trees with 10 leaves. The calculator returns this value when you enter 10, so you can use it to check your own work against a known result.
Why is the recurrence divided by 2?
The two subtrees are unordered, meaning swapping them does not create a new tree. The convolution counts each tree twice for that reason, so the total is halved. The diagonal term corrects the symmetric cases, where a tree's two subtrees are identical and would otherwise be mis-counted.
What is the diagonal term?
When n is even, a(n/2) is added before halving. This term accounts for trees whose two subtrees have equal leaf counts. Without it, those symmetric trees would be undercounted, since the convolution alone does not fully capture the case where both subtrees are the same.
How do these differ from Catalan numbers?
Catalan numbers count ordered binary trees, where left and right children are distinct. Wedderburn-Etherington numbers identify mirror images, so a tree and its reflection count as one. That is why the Wedderburn-Etherington values are smaller than the corresponding Catalan numbers for the same number of leaves.
What is a(9)?
a(9) equals 46. It is computed from a convolution sum of 92 with no diagonal term, since 9 is odd. Because n is odd, no two subtrees can have equal leaf counts, so the diagonal correction is not needed and the sum is simply halved.
How fast does the sequence grow?
Each term is roughly 2.48 times the previous one for large n. The growth is exponential rather than polynomial, so values rise quickly as n increases. This ratio is approximate and applies for large n, not necessarily for the smallest terms in the sequence.