In combinatorial mathematics, the Lobb number Lm,n counts the number of ways that n + m open parentheses and n − m close parentheses can be arranged to form the start of a valid sequence of balanced parentheses.

Lobb numbers form a natural generalization of the Catalan numbers, which count the number of complete strings of balanced parentheses of a given length. Thus, the nth Catalan number equals the Lobb number L0,n. They are named after Andrew Lobb, who used them to give a simple inductive proof of the formula for the nth Catalan number.

The Lobb numbers are parameterized by two non-negative integers m and n with n ≥ m ≥ 0. The (mn)th Lobb number Lm,n is given in terms of binomial coefficients by the formula

$L_{m,n}={\frac {2m+1}{m+n+1)){\binom {2n}{m+n))\qquad {\text{ for ))n\geq m\geq 0.$ An alternative expression for Lobb number Lm,n is:

$L_{m,n}={\binom {2n}{m+n))-{\binom {2n}{m+n+1)).$ The triangle of these numbers starts as (sequence A039599 in the OEIS)

${\begin{array}{rrrrrr}1\\1&1\\2&3&1\\5&9&5&1\\14&28&20&7&1\\42&90&75&35&9&1\\\end{array))$ where the diagonal is

$L_{n,n}=1,$ and the left column are the Catalan Numbers

$L_{0,n}={\frac {1}{1+n)){\binom {2n}{n)).$ As well as counting sequences of parentheses, the Lobb numbers also count the number of ways in which n + m copies of the value +1 and n − m copies of the value −1 may be arranged into a sequence such that all of the partial sums of the sequence are non-negative.

## Ballot counting

The combinatorics of parentheses is replaced with counting ballots in an election with two candidates in Bertrand's ballot theorem, first published by William Allen Whitworth in 1878. The theorem states the probability that winning candidate is ahead in the count, given known final tallies for each candidate.

1. ^ Koshy, Thomas (March 2009). "Lobb's generalization of Catalan's parenthesization problem". The College Mathematics Journal. 40 (2): 99–107. doi:10.4169/193113409X469532.
2. ^ Koshy, Thomas (2008). Catalan Numbers with Applications. Oxford University Press. ISBN 978-0-19-533454-8.
3. ^ Lobb, Andrew (March 1999). "Deriving the nth Catalan number". Mathematical Gazette. 83 (8): 109–110.