StirlingS1

StirlingS1[n,m]

gives the Stirling number of the first kind TemplateBox[{n, m}, StirlingS1].

Details

  • Integer mathematical function, suitable for both symbolic and numerical manipulation.
  • StirlingS1 is defined as the conversion matrix from FactorialPower of discrete calculus to Power of continuous calculus TemplateBox[{x, m}, FactorialPower]=sum_(m=1)^n TemplateBox[{n, m}, StirlingS1]x^m, where m,n in TemplateBox[{}, PositiveIntegers].
  • (-1)^(n-m)TemplateBox[{n, m}, StirlingS1] gives the number of permutations of elements that contain exactly cycles. »
  • StirlingS1 automatically threads over lists.

Examples

open allclose all

Basic Examples  (1)

Evaluate a Stirling number of the first kind:

Evaluate multiple Stirling numbers:

Scope  (2)

StirlingS1 threads elementwise over lists:

TraditionalForm formatting:

Applications  (5)

Plot Stirling numbers of the first kind on a logarithmic scale:

Stirling numbers modulo 2:

Generate the disjoint cycle representations of all permutations of n elements:

Count the number of permutations that have 1, 2, n disjoint cycles:

The unsigned Stirling number of the first kind counts the number of disjoint cycles:

Plot the average number of cycles in symmetric group elements:

The distribution of the position of the ^(th) record in the infinite sequence, independent, identically distributed, continuous random variables:

Visualize the probability mass function of the second record:

Code to find the position of the ^(th) record in a given vector, if any:

Compute positions of the second record in random exponential sequences and compare their histogram to the expected probability mass function:

Properties & Relations  (5)

Generate values from the ordinary generating function:

Generate values from the exponential generating function:

Stirling numbers of the first kind are effectively inverses of Stirling numbers of the second kind:

Calculate large Stirling numbers of the first kind using Cauchy's theorem:

Stirling numbers of the first kind are given by a partial Bell polynomial with signalternating factorial arguments:

Possible Issues  (2)

StirlingS1 can have large values for moderately sized arguments:

The value at is defined to be 1:

Neat Examples  (2)

Plot sums of digits:

Determinants of a matrix with Stirling number entries:

Compare with the closed form:

Wolfram Research (1988), StirlingS1, Wolfram Language function, https://reference.wolfram.com/language/ref/StirlingS1.html.

Text

Wolfram Research (1988), StirlingS1, Wolfram Language function, https://reference.wolfram.com/language/ref/StirlingS1.html.

CMS

Wolfram Language. 1988. "StirlingS1." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/StirlingS1.html.

APA

Wolfram Language. (1988). StirlingS1. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/StirlingS1.html

BibTeX

@misc{reference.wolfram_2024_stirlings1, author="Wolfram Research", title="{StirlingS1}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/StirlingS1.html}", note=[Accessed: 21-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_stirlings1, organization={Wolfram Research}, title={StirlingS1}, year={1988}, url={https://reference.wolfram.com/language/ref/StirlingS1.html}, note=[Accessed: 21-December-2024 ]}