Raney Number Calculator
Number Theory
- The Raney numbers are R(p, r) = r / (2p + r) x C(2p + r, p). With p = 5 and r = 3, the binomial coefficient is C(13, 5) = 1,287.
- Multiplying by r / (2p + r) = 3 / 13 gives R(5, 3) = 297. The division is always exact.
- R(5, 3) = 297. Raney numbers count forests of rooted trees and the ways a product of matrices can be parenthesised with r free factors.
- Setting r = 1 always gives a Catalan number: R(5, 1) = 42. Raising r by one gives R(5, 4) = 572.
The Raney numbers extend the Catalan numbers into a two-parameter family: R(p, r) counts the ways to write a product of p + r factors as a product of p bracketed blocks. With r = 1 they reduce to the Fuss-Catalan numbers, and with p = 2 as well, to the ordinary Catalan numbers 1, 2, 5, 14, 42 that count bracketings, trees and triangulations.
The defining formula is a single binomial coefficient scaled: R(p, r) = (r / (2p + r)) x C(2p + r, p). What makes the family remarkable is how many independent identities compute the same values - a reflection-principle difference of two binomial coefficients, and a convolution that splits the product after its first block.
Enter p and r and the calculator evaluates the definition, then cross-checks it against the reflection identity R(p, r) = C(2p + r - 1, p) - C(2p + r - 1, p - 1) and, for r of 3 or less, against the convolution sum. Three routes to one integer: if they agree, the value is certain.
Worked examples
R(5, 3)
(5 · 3)
| Raney number R(p, r) | 297 |
| Binomial coefficient C(2p + r, p) | 1,287 |
| Catalan number for this p (r = 1) | 42 |
| Raney number R(p, r + 1) | 572 |
R(3, 1) - a Catalan number
(3 · 1)
| Raney number R(p, r) | 5 |
| Binomial coefficient C(2p + r, p) | 35 |
| Catalan number for this p (r = 1) | 5 |
| Raney number R(p, r + 1) | 14 |
R(4, 2)
(4 · 2)
| Raney number R(p, r) | 42 |
| Binomial coefficient C(2p + r, p) | 210 |
| Catalan number for this p (r = 1) | 14 |
| Raney number R(p, r + 1) | 90 |
What Raney numbers count
Take p + r letters in a row. A Raney arrangement groups them into exactly p bracketed blocks, with the brackets placed so every prefix of the product is balanced in the Raney sense. The count of such arrangements is R(p, r), a definition from George Raney's work on functional composition in 1960.
The counting problem sounds narrow, but the same numbers answer questions about trees with given out-degrees, lattice paths that stay above a diagonal, and the moments of free probability distributions - which is why the family keeps resurfacing across combinatorics.
Practically, the three computation routes on this page suit different regimes: the definition for small values, the reflection difference for large exact values, and the convolution when neighbouring values are already known. A calculator that carries all three is not being redundant - it is matching the tool to the terrain, and cross-checking where the terrains overlap.
The Fuss-Catalan connection
Set r = 1 and the family becomes the Fuss-Catalan (ballot / Raney p-Catalan) numbers (1 / (2p + 1)) x C(3p, p) shifted by convention: 1, 3, 12, 55, 273 for the orders used here. Set p = 2, r = 1 and the value is 5 - the Catalan number C(3), counting the bracketings of four factors.
This nesting is the practical way to sanity-check any Raney value: the corners of the (p, r) table must reproduce the Catalan and Fuss-Catalan sequences. The calculator's examples deliberately include such a corner, R(3, 1) = 5.
One more connection for the road: the Raney numbers also count standard Young tableaux of certain shapes and ways to dissect polygons with restricted diagonals in some formulations - the family keeps being rediscovered because the convolution that defines it is the generic shape of a recursive decomposition. Whenever a counting problem splits into a first piece and a rest with two size parameters, a Raney-like table is probably underneath, whether or not the literature bothers to name it.
The reflection identity
R(p, r) = C(2p + r - 1, p) - C(2p + r - 1, p - 1). This is the ballot-problem form of the definition: count all bracketings, subtract those that dip below the diagonal, and the difference counts the valid ones. It is the same reflection principle Andre used for Catalan numbers, generalised.
The identity is more than a check: for large parameters it is often the fastest exact route, since it needs just two binomial coefficients. The calculator shows both binomial values in its steps so the subtraction can be followed.
A worked example
Take p = 5, r = 3. The definition gives (3 / 13) x C(13, 5) = (3 / 13) x 1287 = 297. The reflection identity agrees: C(12, 5) - C(12, 4) = 792 - 495 = 297. The convolution offers a third route, splitting after the first block.
A second example, p = 4, r = 2, gives (2 / 10) x C(10, 4) = 42 - a value Catalan enthusiasts will recognise, appearing here as an interior point of the Raney table rather than on the Catalan diagonal.
The convolution property
Raney numbers satisfy a splitting identity: R(p, r + s + 1) equals the sum over i of R(i, r) x R(p - i, s). Combinatorially it says: cut the product after its first block, count each side, and multiply. The calculator verifies it term by term for small r.
Convolution identities are the working tool of enumerative combinatorics - they become product formulas for generating functions, and the Raney generating function is one of the cleanest examples, satisfying a simple algebraic equation.
Where Raney numbers show up
In free probability, the Raney numbers are the moments of the free Poisson (Marchenko-Pastur) distribution's relatives and appear in the R-transform calculus. In combinatorics proper they count trees by out-degree profile and lattice paths with a generalised slope condition.
They also surface in the analysis of algorithms and queueing models where Fuss-Catalan structures generalise ordinary Catalan structures - any place a bracketing or tree count gains a second parameter, the Raney table is usually underneath.
The generating function
Package the Raney numbers with r fixed into a power series and the series satisfies a strikingly simple equation: it is the unique power-series solution built from the relation that splits a product after its first block - the convolution identity on this page, translated into algebra. For r = 1 the equation reduces to the Fuss-Catalan functional equation, and for the Catalan corner to the famous quadratic whose solution is the Catalan generating function.
This is the standard life cycle of an enumeration family: a counting definition, a convolution from a first-step decomposition, a functional equation, and finally closed forms like the reflection identity. The Raney family is a textbook-clean example of the whole pipeline, which is one reason it is taught.
Reading the Raney table
Arrange the values in a table with p across and r down and patterns emerge. The r = 1 row is Fuss-Catalan: R(2, 1) = 2, R(3, 1) = 5, R(6, 1) = 132. The p = 2 column is triangular-adjacent: R(2, r) counts with a simplicity the general formula hides. Interior values like R(4, 2) = 42 borrow fame from the Catalan diagonal they happen to touch.
The table also exposes the asymmetry: R(p, r) and R(r, p) are unrelated in general, because p counts blocks and r counts spare factors - different jobs. Any table that looks symmetric has been miscomputed, a useful audit the calculator's three-route verification performs automatically.
Free probability, briefly
The deepest modern home of the Raney numbers is free probability, the non-commutative probability theory built by Voiculescu. There, the Marchenko-Pastur distribution - the free analogue of the Poisson distribution - has Catalan numbers as its free moments, and its two-parameter deformation has Raney numbers as moments instead. The R-transform, free probability's analogue of the logarithm of a characteristic function, turns the Raney convolution identity into a product, which is exactly what a transform is for.
It is a long way from bracketing products of letters to random matrices, and the Raney numbers walk the whole distance without changing their definition - the surest sign that a combinatorial family is fundamental rather than decorative.
Common mistakes
The commonest slip is dropping the r / (2p + r) factor and reporting the bare binomial coefficient: for p = 5, r = 3 that gives 1287 instead of 297. The second is swapping p and r, which the asymmetry of the formula punishes immediately.
A third is assuming the r = 1 row uses the same indexing as every Catalan table: conventions differ by a shift, so check a corner value - R(3, 1) must be 5 - before trusting any comparison. The calculator's three-route verification catches all of these.
FAQs
What is a Raney number?
R(p, r) = (r / (2p + r)) x C(2p + r, p), counting the ways to split a product of p + r factors into p bracketed blocks; it generalises the Catalan and Fuss-Catalan numbers.
What is R(5, 3)?
297, from (3 / 13) x C(13, 5) = (3 / 13) x 1287.
How do Raney numbers relate to Catalan numbers?
With r = 1 they give the Fuss-Catalan family, and R(3, 1) = 5 is the Catalan number C(3).
What is the reflection identity for Raney numbers?
R(p, r) = C(2p + r - 1, p) - C(2p + r - 1, p - 1).
What is R(4, 2)?
42.
What is R(7, 2)?
1430.
Where are Raney numbers used?
In free probability (moments and the R-transform), tree and lattice-path enumeration, and generalised bracketing counts.
Who introduced Raney numbers?
George Raney, in his 1960 work on functional composition - the family is also written as the Fuss-Catalan generalisation.
What is R(6, 1)?
132 - the Fuss-Catalan row runs 1, 2, 5, 14, 42, 132 in the convention used here: R(2, 1) = 2, R(3, 1) = 5, R(6, 1) = 132.
Is the Raney table symmetric?
No - p counts bracketed blocks and r counts spare factors, so R(p, r) and R(r, p) are different quantities.