<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->

# 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

```js
math.bellNumbers(n)
```

### Parameters

Parameter | Type | Description
--------- | ---- | -----------
`n` | Number &#124; BigNumber | Total number of objects in the set

### Returns

Type | Description
---- | -----------
Number &#124; BigNumber | B(n)


## Examples

```js
math.bellNumbers(3) // returns 5
math.bellNumbers(8) // returns 4140
```


## See also

[stirlingS2](stirlingS2.md)
