\(\text{s}\)

You can use the \(\text{s}\) function to calculate Sterling numbers of the first kind.

You can use the \sterling1fn backslash command to insert this function.

The following variants of this function are available:

  • \(\text{real } \text{s} \left ( \text{<n>}, \text{<k>} \right )\)

Where \(\text{<n>}\) and \(\text{<k>}\) represents the number of elements and number of disjoint cycles respectively.

The function returns the number of permutations calculated by the recurrence relation:

\[\text{s} \left ( n, k \right ) = \left ( n - 1 \right ) \text{s} \left ( n - 1 , k \right ) + \text{s} \left ( n - 1 , k - 1 \right )\]

Figure 199 shows the basic use of the \(\text{s}\) function.

../_images/sterling_function_1_example.png

Figure 199 Example Use Of The s Function