Stirling Number of First Kind How i can calculate stirling number of first kind $s(n,k)$.
I need to calculate it for $n$ up to $100$. I need to calculate the $s(n,k)$ modulo $x$. Here $x$ is a finite integer.
 A: I usually see the Stirling Numbers of the First Kind defined as the coefficients of Rising Factorial. Written using binomial coefficients, we can deduce a recurrence for the Stirling Numbers of the First Kind:
$$
\newcommand{\stirone}[2]{\left[{#1}\atop{#2}\right]}
\begin{align}
\sum_{k=0}^n\stirone{n}{k}\frac{x^k}{n!}
&=\binom{n-1+x}{n}\\
&=\frac{n-1+x}{n}\binom{n-2+x}{n-1}\\
&=\frac{n-1+x}{n}\sum_{k=0}^n\stirone{n-1}{k}\frac{x^k}{(n-1)!}\\
&=(n-1)\sum_{k=0}^n\stirone{n-1}{k}\frac{x^k}{n!}+\sum_{k=0}^n\stirone{n-1}{k-1}\frac{x^k}{n!}\tag{1}\\
\end{align}
$$
Equating coefficients of $x$ in $(1)$ yields
$$
\stirone{n}{k}=(n-1)\stirone{n-1}{k}+\stirone{n-1}{k-1}\tag{2}
$$
Except for the factor of $n-1$, $(2)$ is similar to the Pascal's triangle recurrence for the binomial coefficients.
Starting with $\stirone{0}{0}=1$ and $\stirone{n}{0}=\stirone{0}{n}=0$ for $n\gt0$, $(2)$ should allow you to define the Stirling numbers of the First Kind. Note that these boundary conditions and $(2)$ imply that $\stirone{n}{n}=1$ and  $\stirone{n}{k}=0$ if $n\lt k$.
A: Use the recurrence relation $s(n+1,k) = n\cdot s(n,k)+s(n,k-1)$ along with $s(0,0)=1$ and $s(n,0)=s(0,n)=0$.
