# bellNumber

> **bellNumber**(`n`): `bigint`

Defined in: [packages/combinatorics/src/bell-number.ts:12](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/combinatorics/src/bell-number.ts#L12)

Count all set partitions of n items as a bigint, with bellNumber(0) = 1n.

O(n²) additions and O(n) bigint storage.

## Parameters

### n

`number`

## Returns

`bigint`

## Throws

With `INVALID_COUNT` for an invalid count or `COUNT_TOO_LARGE` if n exceeds `COMBINATORICS_MAX_COUNT`.
