mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-18 14:59:29 +00:00
40 lines
701 B
Markdown
40 lines
701 B
Markdown
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
|
|
|
|
# Function catalan
|
|
|
|
The Catalan Numbers enumerate combinatorial structures of many different types.
|
|
catalan only takes integer arguments.
|
|
The following condition must be enforced: n >= 0
|
|
|
|
|
|
## Syntax
|
|
|
|
```js
|
|
math.catalan(n)
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Parameter | Type | Description
|
|
--------- | ---- | -----------
|
|
`n` | Number | BigNumber | nth Catalan number
|
|
|
|
### Returns
|
|
|
|
Type | Description
|
|
---- | -----------
|
|
Number | BigNumber | Cn(n)
|
|
|
|
|
|
## Examples
|
|
|
|
```js
|
|
math.catalan(3); // returns 5;
|
|
math.catalan(8); // returns 1430;
|
|
```
|
|
|
|
|
|
## See also
|
|
|
|
[bellNumbers](bellNumbers.md)
|