combinat::stirling1 --
Stirling numbers of the first kind
Introductioncombinat::stirling1(n,k) computes the Stirling numbers
of the first kind.
Call(s)combinat::stirling1(n,k)
Parametersn,k |
- | nonnegative integers |
Returnsan integer.
Detailsn symbols that have exactly k cycles. Then
combinat::stirling1(n,k) computes
-1^(n+k)*S(n,k).sum(S1(n,k)*x^k, k=0...n) = x*(x-1) ... (x-n+1)
Example
1Let us have a look what's the result of x*(x-1)*(x-2)*(x-3)*(x-4)*(x-5) written as a sum.
>> expand(x*(x-1)*(x-2)*(x-3)*(x-4)*(x-5))
2 3 4 5 6
274 x - 120 x - 225 x + 85 x - 15 x + x
Now let us ``prove'' the formula mentioned in the ``Details'' section by calculating the proper stirling numbers
>> combinat::stirling1(6,1); combinat::stirling1(6,2); combinat::stirling1(6,3); combinat::stirling1(6,4); combinat::stirling1(6,5); combinat::stirling1(6,6)
-120
274
-225
85
-15
1
Example
2>> combinat::stirling1(3,-1)
Error: Arguments must be nonnegative integers. [combinat::sti\
rling1]
Further
DocumentationJ.J. Rotman, An Introduction to the Theory of Groups, 3rd Edition, Wm. C. Brown Publishers, Dubuque, 1988