stirlingnumber2k

Calulates the Stirling number of the fist and second kind. It represents the number of ways to partition a set of n objects into k non-empty subsets. Depending on input, function can return scalar, vector or matrix

Arguments

  1. Integer n
  2. Integer k

Output

Stirling number

Examples

stirlingnumber2k