About Stirling Number Calculator

The classical Stirling Numbers of the Second Kind, denoted S(n, k), are the number of ways to partition n distinct objects into exactly k nonempty subsets. The numbers presented here were calculated using the well-known recurrence

S(n, k) = S(n - 1, k - 1) + k * S(n - 1, k).

If we let the n objects be the integers 1, 2, ..., n, we can define a generalization of the Stirling Numbers of the Second Kind. Define the Reduced Stirling Numbers of the Second Kind, denoted Sd(n, k), to be the number of ways to partition the integers 1, 2, ..., n into exactly k nonempty subsets such that all elements in each subset have pairwise distance at least d. That is, for any integers i and j in a given subset, we require |i - j| ≥ d. It has been shown that these numbers satisfy

Sd(n, k) = S(n - d + 1, k - d + 1), where n ≥ k ≥ d

(hence the name "reduced"). Observe (both by definition and by the reduction formula) that S1(n, k) = S(n, k), the classical Stirling Numbers of the Second Kind.

Available for download are the output file (.txt 43mb) containing the values of S(n, k) for 1 ≤ kn ≤ 500 and the Java source code that generated the output file.

Back to Stirling Number Calculator