UNPKG

773 BMarkdownView Raw
1<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
2
3# Function bellNumbers
4
5The Bell Numbers count the number of partitions of a set. A partition is a pairwise disjoint subset of S whose union is S.
6bellNumbers only takes integer arguments.
7The following condition must be enforced: n >= 0
8
9
10## Syntax
11
12```js
13math.bellNumbers(n)
14```
15
16### Parameters
17
18Parameter | Type | Description
19--------- | ---- | -----------
20`n` | Number &#124; BigNumber | Total number of objects in the set
21
22### Returns
23
24Type | Description
25---- | -----------
26Number &#124; BigNumber | B(n)
27
28
29## Examples
30
31```js
32math.bellNumbers(3) // returns 5
33math.bellNumbers(8) // returns 4140
34```
35
36
37## See also
38
39[stirlingS2](stirlingS2.md)