It is known that the Stirling numbers of the first kind ${n\brack k}$ and second kind ${n\brace k}$ are unimodal. Is it known at which $k$'s the maximum occurs?
-
3Check this: https://math.stackexchange.com/q/1156757/42969 – Martin R Mar 19 '25 at 19:41
2 Answers
Stirling numbers of the first kind
In 1951, Hammersley [1] showed that the sequence of ${n\brack k}, k=1,\dots,n$ is unimodal, where the maximizing index $k_n$ is unique (later proved by Erdos [2]) and given by the following semi-closed-form formula (see (10) in [1]):
$$k_n=\left\lfloor\ln(n)+\gamma-1+\frac{\zeta(2)-\zeta(3)}{\ln(n)+\gamma-\frac32}+\frac{h(n)}{\left(\ln(n)+\gamma-\frac32\right)^2}\right\rfloor \\ =\left\lfloor\ln(n)+\gamma-1+o\left (\frac{1}{\ln(n)}\right)\right\rfloor $$
for some function $h(n)$ whose values vary in $(-1.098011, 1.430089)$. In this formula, $\gamma$ is the Euler-Mascheroni constant and $\zeta$ is the Riemann's zeta function. The above for $n > 189$ implies (see (4) in [2]) $$\left\lfloor\ln (n-1)+\frac12\right\rfloor\le k_n\le\lfloor\ln (n-1)\rfloor+1,$$
which means only one or two options should be checked to determine $k_n$ for $n>189$.
Carefully note that equations (5) and (6) in [1] and (4) in [2] are for the maximizing index of $\Pi_{n,k}$, i.e., the sum of the products of the first $n$ natural numbers taken $k$ at a time, for which we have (see here [3] for a proof) $$\Pi_{n,k}={n+1\brack n+1-k}.$$
Unfortunately, these equations have been mistakenly used for the maximizing index of ${n\brack k}$ (e.g., see the formula and bounds given for $k_n$ in this 2015 MSE answer [4] and this 2008 paper [5]).
Stirling numbers of the second kind
The sequence of ${n\brace k}, k=1,\dots,n$ is unimodal, but the maximizing index $K_n$ was conjectured to be unique for $n\ge 3$ by Wegner in 1973 (still remained unsolved [6]), that is, the maximum value may be obtained for two consecutive indexes. Moreover, for $K_n$ no formula has been presented yet. It is known that $K_n \sim n/\ln n $ as $n\to \infty$ [7]. In 2009, Yu [8] proved the following bounds:
$$\left\lfloor e^{W(n)} \right\rfloor -2 \le K_n \le \left\lfloor e^{W(n)} \right\rfloor+1,$$
where $W$ denotes the Lambert-W function. As the length of the interval is always 3, one can determine $K_n$ by evaluating ${n\brace k}$ for only four values $k=\left\lfloor e^{W(n)} \right\rfloor+ i, i=-2,-1,0,1$.
The maximum of r-Stirling numbers is studied in [5].
- 11,124
-
1To connect this to my answer, by definition $W(n) e^{W(n)} = n$, so $e^{W(n)} = \frac{n}{W(n)}$. Personally I do not understand why this number appears to be written as $e^{W(n)}$ so often in the literature, I think $\frac{n}{W(n)}$ makes the asymptotic growth clearer (we also get that the average size of a part of a random set partition is about $W(n)$). – Qiaochu Yuan Mar 20 '25 at 00:15
-
1@QiaochuYuan Thanks for the clarification. I think $e^{W(x)}$ is preferred to $\frac{x}{W(x)}$ because $\frac{0}{W(0)}=\frac{0}{0}$ is undefined for $x=0$. – Amir Mar 20 '25 at 03:07
Let $X$ be the number of cycles in a random permutation of $n$ objects and let $Y$ be the number of parts in a random set partition of $n$ objects. You are asking about the modes of $X$ and $Y$. The mean of $X$ is known exactly, namely it is the harmonic number
$$\mathbb{E}(X) = H_n \approx \log n + \gamma.$$
In fact $X$ is the sum of $n$ independent Bernoulli random variables $B(1) + B \left( \frac{1}{2} \right) + \dots + B \left( \frac{1}{n} \right)$ so is asymptotically Gaussian with mean $H_n$, so the mode should be either the floor or ceiling of $\boxed{ H_n }$ (maybe off by $1$ in either direction at worst), and this could be checked experimentally.
The mean and mode of $Y$ are both approximately $\frac{n}{W(n)}$ where $W$ is the Lambert W function; see here for a discussion (without full details or error terms). The distribution of $Y$ is also asymptotically Gaussian. I think but am not sure that the mode is either the floor or the ceiling of $\boxed{ \frac{n}{W(n)} - 1 }$ (maybe off by $1$ in either direction at worst, again), and this could also be checked experimentally.
To put some concrete numbers to this let's take $n = 50$. Then
For the Stirling cycle numbers, $H_{50} = 4.5 \dots$ so we should check $k = 4, 5$. We have $s(50, 4) = 7.1 \times 10^{63}$ and $s(50, 5) = 6.4 \times 10^{63}$ so the mode is $\boxed{ 4 = \lfloor H_{50} \rfloor }$ in this case.
For the Stirling set / partition numbers, $\frac{50}{W(50)} - 1 = 16.5 \dots$ so we should check $k = 16, 17$. We have $S(50, 16) = 3.84 \dots \times 10^{46}$ and $S(50, 17) = 3.76 \dots \times 10^{46}$ so the mode is $\boxed{16 = \left\lfloor \frac{50}{W(50)} - 1 \right\rfloor }$ in this case.
The exact value of $k$ for the Stirling set numbers is A024417 on the OEIS. The sequence for the Stirling cycle numbers is a little hard to search for because it grows slowly.
- 468,795
-
1+1 Perhaps worth adding $s(50,3) =1.13\times 10^{63}$ and $S(50,15)=2.92\ldots \times 10^{46}$ to show these are (at least local) maxima. There does not seem to ba a list of the argmax k in OEIS for Stirling numbers of the first kind, but it seems I contributed the corresponding values to A065048 more than two decades ago. – Henry Mar 20 '25 at 01:20