How this calculation works
The recurrence either inserts the last item into one of k existing groups or makes it a singleton group.
S(n,k) = k S(n−1,k) + S(n−1,k−1)A worked example
Five distinct items can be split into three nonempty groups in 25 ways.
Good to know
Groups have no order.
Reference: NIST DLMF, Functions of Number Theory (opens in a new tab) ↗
Read the result
Count ways to split labeled items into exactly k unlabeled nonempty groups.
The primary result is labeled “Partitions”. Keep the input definitions in view when comparing this result with another method.
Try a related calculation
Groups have no order.
For a related exercise, try the greatest common divisor.
A few questions, answered
How can I check the default inputs by hand?
Five distinct items can be split into three nonempty groups in 25 ways.
Which rule does this calculator apply?
S(n,k) = k S(n−1,k) + S(n−1,k−1)