Two types of Stirling numbers count fundamental combinatorial structures. S(n,k) — second kind — counts ways to partition n elements into k non-empty subsets. s(n,k) — first kind (unsigned) — counts permutations of n with exactly k cycles.
Triangle (2nd kind)
Partition Explorer
1st Kind Cycles
Stirling numbers of the second kind S(n,k)
S(n,k) = k·S(n-1,k) + S(n-1,k-1)
Click a cell to see the value and a visual partition.