mathjs
Version:
Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with dif
53 lines (32 loc) • 1.04 kB
Markdown
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
The Stirling numbers of the second kind, counts the number of ways to partition
a set of n labelled objects into k nonempty unlabelled subsets.
stirlingS2 only takes integer arguments.
The following condition must be enforced: k <= n.
If n = k or k = 1 <= n, then s(n,k) = 1
If k = 0 < n, then s(n,k) = 0
Note that if either n or k is supplied as a BigNumber, the result will be
as well.
```js
math.stirlingS2(n, k)
```
Parameter | Type | Description
--------- | ---- | -----------
`n` | Number &
`k` | Number &
Type | Description
---- | -----------
Number &
Type | Description
---- | -----------
```js
math.stirlingS2(5, 3) //returns 25
```
[](bellNumbers.md)