Stirling2 - Maple Programming Help

Home : Support : Online Help : Mathematics : Mathematical Functions : Stirling2

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}}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}\frac{{\mathrm{binomial}}{}\left({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}}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}\frac{{1}}{{120}}{}\frac{{\mathrm{binomial}}{}\left({5}{,}{\mathrm{_k1}}\right){}{{\mathrm{_k1}}}^{{10}}}{{\left({-}{1}\right)}^{{-}{5}{+}{\mathrm{_k1}}}}$ (3)
 > $\mathrm{value}\left(\right)$
 ${42525}{=}{42525}$ (4)