Stirling numbers of the second kind (stirling_s2)
Stirling number of the second kind: the ways to split n items into k groups.
How to write it
stirling_s2(n, k)
- n
- A whole number. Takes a whole number.
- k
- A whole number. Takes a whole number.
Examples
stirling_s2(4, 2)In the solver,
Open in the solverstirling_s2(4, 2)gives7.
Related functions
- stirling_s1
Stirling number of the first kind, with sign.
- subfactorial
Subfactorial: how many ways to reorder n items so none stays in place.
- totient
Euler's totient: how many whole numbers up to n are coprime to n.
- squares_r
How many ways a whole number is a sum of a given count of squares, counting order and signs.
- bell_b
The n-th Bell number: how many ways to split n items into groups.
- solve_congruence
Solve a congruence for a variable.