2018-06-16 15:39:07 +02:00

44 lines
1.1 KiB
Markdown

---
layout: default
---
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
<h1 id="function-catalan">Function catalan <a href="#function-catalan" title="Permalink">#</a></h1>
The Catalan Numbers enumerate combinatorial structures of many different types.
catalan only takes integer arguments.
The following condition must be enforced: n >= 0
<h2 id="syntax">Syntax <a href="#syntax" title="Permalink">#</a></h2>
```js
math.catalan(n)
```
<h3 id="parameters">Parameters <a href="#parameters" title="Permalink">#</a></h3>
Parameter | Type | Description
--------- | ---- | -----------
`n` | Number &#124; BigNumber | nth Catalan number
<h3 id="returns">Returns <a href="#returns" title="Permalink">#</a></h3>
Type | Description
---- | -----------
Number &#124; BigNumber | Cn(n)
<h2 id="examples">Examples <a href="#examples" title="Permalink">#</a></h2>
```js
math.catalan(3) // returns 5
math.catalan(8) // returns 1430
```
<h2 id="see-also">See also <a href="#see-also" title="Permalink">#</a></h2>
[bellNumbers](bellNumbers.html)