mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-25 15:07:57 +00:00
1.2 KiB
1.2 KiB
| layout |
|---|
| default |
Function bellNumbers #
The Bell Numbers count the number of partitions of a set. A partition is a pairwise disjoint subset of S whose union is S. bellNumbers only takes integer arguments. The following condition must be enforced: n >= 0
Syntax #
math.bellNumbers(n)
Parameters #
| Parameter | Type | Description |
|---|---|---|
n |
Number | BigNumber | Total number of objects in the set |
Returns #
| Type | Description |
|---|---|
| Number | BigNumber | B(n) |
Examples #
math.bellNumbers(3) // returns 5
math.bellNumbers(8) // returns 4140