Stirling Numbers of the First Kind Calculator
Enter n and k to compute the unsigned c(n,k) and signed s(n,k) Stirling numbers of the first kind via recurrence. Exact BigInt arithmetic for large values.
Input
Enter n and k to compute the Stirling number of the first kind by recurrence. The main value is the unsigned c(n,k).
Integer of 0 or more (up to 170)
Integer from 0 up to n
Result
Unsigned c(6, 3)
225
Signed s(6, 3)
-225
n
6
k
3
Row of c(6, k) for k = 0 to 6
| k | Unsigned c(n, k) | Signed s(n, k) |
|---|---|---|
| 0 | 0 | 0 |
| 1 | 120 | -120 |
| 2 | 274 | 274 |
| 3 | 225 | -225 |
| 4 | 85 | 85 |
| 5 | 15 | -15 |
| 6 | 1 | 1 |
How it works
- Stirling numbers of the first kind count, in their unsigned form, the ways to arrange n elements into k disjoint cycles (permutations with k cycles).
- The unsigned numbers c(n,k) follow the recurrence c(n,k)=c(n-1,k-1)+(n-1)c(n-1,k) with base case c(0,0)=1.
- The signed numbers are s(n,k)=(-1)^(n-k) c(n,k); they are the coefficients when the falling factorial x(x-1)...(x-n+1) is expanded in powers of x.
- Useful identities: c(n,n)=1, c(n,1)=(n-1)!, and c(n,0)=0 for n greater than 0 while c(0,0)=1.
- Values grow rapidly with n, so the tool uses BigInt to keep results exact without floating point rounding.
- Inputs must be integers with 0 less than or equal to k less than or equal to n, and n is capped at 170 to bound the computation.
Reviews
Tell us what you think of this calculator.
Write a review
- Home
Stirling Numbers of the First Kind Calculator