mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-25 15:07:57 +00:00
701 B
701 B
Function catalan
Finds the nth Catalan numbers. This is used in Combinatorics applications such as Dyck paths, non-isomorphic ordered trees with n vertices, etc. catalan only takes integer arguments.
Syntax
math.catalan(n)
Parameters
| Parameter | Type | Description |
|---|---|---|
n |
Number | BigNumber | The nth Catalan number to find |
Returns
| Type | Description |
|---|---|
| Number | BigNumber | C(n) |
Examples
math.catalan(7); //returns 429
See also