stirlingFirstKind(
n,k):bigint
Defined in: packages/combinatorics/src/stirling-first-kind.ts:17
Count permutations of n items with k cycles, the unsigned Stirling number of the first kind, as a bigint. Returns 0n for k > n.
O(nk) arithmetic operations and O(k) bigint storage when k <= n.
Parameters
Section titled “Parameters”number
number
Returns
Section titled “Returns”bigint
Throws
Section titled “Throws”With INVALID_COUNT for an invalid count
or COUNT_TOO_LARGE if n exceeds COMBINATORICS_MAX_COUNT.