Wilang Documentation1.0.0+4

stirlingS2#

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, then s(n,k) = 1.

Available in: math cells, REPL.

Syntax#

stirlingS2(n, k)

Arguments and behavior#

Arguments must match one of the syntax forms above. Use the example as a starting point; arrays and numeric types are accepted only by compatible overloads. The example returns scalar (number).

Example#

Edit the inputs, then use Run or Reset. Changes stay in this example.

Example
stirlingS2(5, 3)

Expected result: 25.

See also#

bellNumbers · bernoulli

All functions · Math guides