Stirling Number Calculator Calculate the number of partitions of the set {1, 2, …, n} into exactly k nonempty subsets in such a way that any two elements a and b belonging to the same subset satisfy |a – b| ≥ d. (When d = 1, these are the classical Stirling Numbers of the Second Kind.) Learn More Enter values for n, k, and d, 1 ≤ d ≤ k ≤ n ≤ 100. To return the entire nth row, leave the value for k blank. Number of objects to partition (n) Number of nonempty subsets (k) Distance (d) Enter values and press Calculate