supercatalan: Returns the super-Catalan number sequence up to the given...

Description Usage Arguments Value References Examples

Description

The super-Catalan numbers, also known as the Schroeder-Hipparchus numbers, or little Schroeder numbers, count the number of lattice paths (path composed of a connected horizontal and vertical line segment) with diagonal steps from n, n to 0, 0 without crossing the diagonal line. The super-Catalan numbers are given by the recurrence relation:

S(n) = \frac{3(2n - 3) \space S(n-1) - (n-3) \space S(n-2)}{n}

Usage

1

Arguments

n

Specifies the length of the returned super-Catalan number sequence

Value

vector of length n

References

Weisstein, Eric W. "Lattice Path." From MathWorld–A Wolfram Web Resource. http://mathworld.wolfram.com/LatticePath.html Weisstein, Eric W. "Super Catalan Number." From MathWorld–A Wolfram Web Resource. http://mathworld.wolfram.com/SuperCatalanNumber.html

Examples

1

aschleg/numberr documentation built on May 14, 2019, 10:31 a.m.