stirling2 - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Stirling2

computes the Stirling numbers of the second kind

 Calling Sequence Stirling2(n, m) combinat[stirling2](n, m)

Parameters

 n, m - integers

Description

 • The Stirling2(n,m) command computes the Stirling numbers of the second kind from the well-known formula in terms of the binomial coefficients.

$\mathrm{Stirling2}\left(n,m\right)=\sum _{k=0}^{m}\frac{\left(\genfrac{}{}{0}{}{m}{k}\right){k}^{n}}{m!{\left(-1\right)}^{k-m}}$

 Instead of Stirling2 you can also use the synonym combinat[stirling2].
 • Regarding combinatorial functions, $\mathrm{Stirling2}\left(n,m\right)$ is the number of ways of partitioning a set of n elements into m non-empty subsets. The Stirling numbers also enter binomial series, Mathieu function formulas, and are relevant in applications in Physics.

Examples

Stirling2 only evaluates to a number when $m$ and $n$ are positive integers

 > $\mathrm{Stirling2}\left(n,m\right)$
 ${\mathrm{Stirling2}}{}\left({n}{,}{m}\right)$ (1)
 > $=\mathrm{convert}\left(,\mathrm{Sum}\right)$
 ${\mathrm{Stirling2}}{}\left({n}{,}{m}\right){=}{\sum }_{{\mathrm{_k1}}{=}{0}}^{{m}}{}\frac{\left(\genfrac{}{}{0}{}{{m}}{{\mathrm{_k1}}}\right){}{{\mathrm{_k1}}}^{{n}}}{{m}{!}{}{\left({-1}\right)}^{{-}{m}{+}{\mathrm{_k1}}}}$ (2)
 > $\mathrm{eval}\left(,\left[n=10,m=5\right]\right)$
 ${42525}{=}{\sum }_{{\mathrm{_k1}}{=}{0}}^{{5}}{}\frac{\left(\genfrac{}{}{0}{}{{5}}{{\mathrm{_k1}}}\right){}{{\mathrm{_k1}}}^{{10}}}{{120}{}{\left({-1}\right)}^{{-}{5}{+}{\mathrm{_k1}}}}$ (3)
 > $\mathrm{value}\left(\right)$
 ${42525}{=}{42525}$ (4)