1 |
|
2 |
|
3 | # Function catalan
|
4 |
|
5 | The Catalan Numbers enumerate combinatorial structures of many different types.
|
6 | catalan only takes integer arguments.
|
7 | The following condition must be enforced: n >= 0
|
8 |
|
9 |
|
10 | ## Syntax
|
11 |
|
12 | ```js
|
13 | math.catalan(n)
|
14 | ```
|
15 |
|
16 | ### Parameters
|
17 |
|
18 | Parameter | Type | Description
|
19 | --------- | ---- | -----------
|
20 | `n` | Number | BigNumber | nth Catalan number
|
21 |
|
22 | ### Returns
|
23 |
|
24 | Type | Description
|
25 | ---- | -----------
|
26 | Number | BigNumber | Cn(n)
|
27 |
|
28 |
|
29 | ## Examples
|
30 |
|
31 | ```js
|
32 | math.catalan(3) // returns 5
|
33 | math.catalan(8) // returns 1430
|
34 | ```
|
35 |
|
36 |
|
37 | ## See also
|
38 |
|
39 | [bellNumbers](bellNumbers.md)
|