UNPKG

697 BMarkdownView Raw
1<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
2
3# Function catalan
4
5The Catalan Numbers enumerate combinatorial structures of many different types.
6catalan only takes integer arguments.
7The following condition must be enforced: n >= 0
8
9
10## Syntax
11
12```js
13math.catalan(n)
14```
15
16### Parameters
17
18Parameter | Type | Description
19--------- | ---- | -----------
20`n` | Number &#124; BigNumber | nth Catalan number
21
22### Returns
23
24Type | Description
25---- | -----------
26Number &#124; BigNumber | Cn(n)
27
28
29## Examples
30
31```js
32math.catalan(3) // returns 5
33math.catalan(8) // returns 1430
34```
35
36
37## See also
38
39[bellNumbers](bellNumbers.md)