Skip to content

bellNumber(n): bigint

Defined in: packages/combinatorics/src/bell-number.ts:12

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

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

number

bigint

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