catalan.md (749B)
1 <!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. --> 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 ### Throws 30 31 Type | Description 32 ---- | ----------- 33 34 35 ## Examples 36 37 ```js 38 math.catalan(3) // returns 5 39 math.catalan(8) // returns 1430 40 ``` 41 42 43 ## See also 44 45 [bellNumbers](bellNumbers.md)