mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-25 15:07:57 +00:00
39 lines
716 B
Markdown
39 lines
716 B
Markdown
# Function bellNumbers
|
|
|
|
Calculate the Bell Number for an `n` element set.
|
|
|
|
## Syntax
|
|
|
|
```js
|
|
math.bellNumbers(n)
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Parameter | Type | Description
|
|
--------- | ---- | -----------
|
|
`n` | Number | BigNumber | Function input
|
|
|
|
### Returns
|
|
|
|
Type | Description
|
|
---- | -----------
|
|
Number | BigNumber | The number of ways to partition a set of n elements.
|
|
|
|
|
|
## Examples
|
|
|
|
```js
|
|
math.bellNumbers(5); // returns Number 52
|
|
math.bellNumbers(math.bignumber(10)); // returns Number 115975
|
|
```
|
|
|
|
|
|
## See also
|
|
|
|
[combinations](combinations.md),
|
|
[stirlingS2](stirlingS2.md)
|
|
|
|
|
|
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
|