gives the Stirling number of the first kind .
- Integer mathematical function, suitable for both symbolic and numerical manipulation.
- gives the number of permutations of elements that contain exactly cycles.
- StirlingS1 automatically threads over lists.
Examplesopen allclose all
Plot Stirling numbers of the first kind on a logarithmic scale:
Plot the average number of cycles in symmetric group elements:
The distribution of the position of the 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 record in a given vector, if any:
Compute positions of the second record in random exponential sequences and compare their histogram to the expected pmf:
Properties & Relations (4)
Generate values from the 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 sign‐alternating factorial arguments:
Possible Issues (2)
StirlingS1 can have large values for moderately sized arguments:
The value at is defined to be 1: