stirling1 - Maple Help

Stirling1

computes the Stirling numbers of the first kind

 Calling Sequence Stirling1(n, m) combinat[stirling1](n, m)

Parameters

 n, m - integers

Description

 • The Stirling1(n,m) command computes the Stirling numbers of the first kind using the (implicit) generating function

$\sum _{m=0}^{n}\mathrm{Stirling1}\left(n,m\right){x}^{m}=-\frac{{\left(-1\right)}^{n+1}\mathrm{\Gamma }\left(n-x\right)}{\mathrm{\Gamma }\left(-x\right)}=x\left(x-1\right)\mathrm{...}\left(x-n+1\right)$

 Instead of Stirling1 you can also use the synonym combinat[stirling1].
 • Regarding combinatorial functions, ${\left(-1\right)}^{\left(n-m\right)}\mathrm{Stirling1}\left(n,m\right)$ is the number of permutations of n symbols that have exactly m cycles. The Stirling numbers also enter binomial series, Mathieu function formulas, and are relevant in physical applications.
 • The Stirling numbers of the first kind can be expressed as an explicit Sum with the Stirling numbers of second kind in the coefficients:

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

 Since the Stirling numbers of the second kind also admit an explicit Sum representation,

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

 then, an explicit double Sum representation for Stirling1 is possible by combining the two formulas above. (See the Examples section.)

Examples

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

 > $\mathrm{Stirling1}\left(m,n\right)$
 ${\mathrm{Stirling1}}{}\left({m}{,}{n}\right)$ (1)
 > $=\mathrm{convert}\left(,\mathrm{Sum}\right)$
 ${\mathrm{Stirling1}}{}\left({m}{,}{n}\right){=}{\sum }_{{\mathrm{_k1}}{=}{0}}^{{m}{-}{n}}{}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\sum }_{{\mathrm{_k2}}{=}{0}}^{{\mathrm{_k1}}}{}\frac{{\left({-1}\right)}^{{2}{}{\mathrm{_k1}}{-}{\mathrm{_k2}}}{}\left(\genfrac{}{}{0}{}{{m}{-}{1}{+}{\mathrm{_k1}}}{{m}{-}{n}{+}{\mathrm{_k1}}}\right){}\left(\genfrac{}{}{0}{}{{2}{}{m}{-}{n}}{{m}{-}{n}{-}{\mathrm{_k1}}}\right){}\left(\genfrac{}{}{0}{}{{\mathrm{_k1}}}{{\mathrm{_k2}}}\right){}{{\mathrm{_k2}}}^{{m}{-}{n}{+}{\mathrm{_k1}}}}{{\mathrm{_k1}}{!}}$ (2)
 > $\mathrm{eval}\left(,\left[m=10,n=5\right]\right)$
 ${-269325}{=}{\sum }_{{\mathrm{_k1}}{=}{0}}^{{5}}{}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{\sum }_{{\mathrm{_k2}}{=}{0}}^{{\mathrm{_k1}}}{}\frac{{\left({-1}\right)}^{{2}{}{\mathrm{_k1}}{-}{\mathrm{_k2}}}{}\left(\genfrac{}{}{0}{}{{9}{+}{\mathrm{_k1}}}{{5}{+}{\mathrm{_k1}}}\right){}\left(\genfrac{}{}{0}{}{{15}}{{5}{-}{\mathrm{_k1}}}\right){}\left(\genfrac{}{}{0}{}{{\mathrm{_k1}}}{{\mathrm{_k2}}}\right){}{{\mathrm{_k2}}}^{{5}{+}{\mathrm{_k1}}}}{{\mathrm{_k1}}{!}}$ (3)
 > $\mathrm{value}\left(\right)$
 ${-269325}{=}{-269325}$ (4)