lajos/The W function

In this note, \(p\ge 2\) is an integer and \(m\in [2,p]\cap\mathbb{N}\) (unless otherwise stated). Let us define \[ F_p(m):=\frac{m^{p-1} }{(p-m)! (m-1)!}=\frac{m^p}{p!}\binom{p}{m}, \] then we were interested in the quantity \[ \max_{2\le m\le p} F_p(m). \]

Our aim now is to compute the exact asymptotic location of the \(m\)-value within the interval \([2,p]\) (as \(p\to +\infty\)) at which \(F_p\) attains its (unique) maximum.

For any fixed \(p\ge 3\), let us first consider the function \[ m\mapsto G_p(m):=\frac{F_p(m+1)}{F_p(m)}=m^{-p} (m+1)^{p-1} (p-m). \] Notice that \(G_p(2)>1\) (for all \(p\ge 3\)) and \(G_p(p)=0\). By letting \(m\) to be a continuous variable, we see that \(G_p(\cdot)\) is a smooth function and \[ \partial_m G_p(m)=-m^{-p-1} (m+1)^{p-2} \left(m+p^2\right)<0. \] Consequently, there is a unique \(m_c^*(p)\in (2,p)\) such that \(G_p(m_c^*(p))=1\). (Here the subscript \(_c\) in \(m_c^*\) refers to ‘’continuous’’.)

Elementary number theory says that \(m_c^*(p)\) is never an integer. (Indeed, if it were, then by \(G_p(m_c^*(p))=1\) we would have—by simply writing \(m\) instead of \(m_c^*(p)\)—that \[ (m+1)^{p-1} (p-m)=m^p, \] a contradiction, since \(m+1\) and \(m\) are relatively prime.)

This means that the function \([2,p]\cap\mathbb{N} \ni m\mapsto F_p(m)\) has a unique maximum at \(m^*(p):=\lceil m_c^*(p)\rceil\).

We are going to formulate our main result in terms of the Lambert \(W\) function (a.k.a. ProductLog in Mathematica): recall that if \(z\ge-\frac{1}{e}\), then there is a unique \(W(z)\ge -1\) such that \[ z=W(z) e^{W(z)}. \]


Lemma. \[ \lim_{p\to +\infty} \frac{m_c^*(p)}{p}=\frac{1}{1+W\left(\frac{1}{e}\right)}. \] Proof. First step. For any \(p\ge 2\), let us define \(L(p):=\frac{m_c^*(p)}{p}\). We show that \(\frac{1}{2}<L(p)<1\). The upper estimate is trivial, since we already know that \(m_c^*(p)< p\). On the other hand, due to the fact that \(G_p(\cdot)\) is strictly decreasing, \(\frac{p}{2}< m_c^*(p)\) is equivalent to \[ G_p\left(\frac{p}{2}\right)=\left(1+\frac{2}{p}\right)^{p-1}>1. \]

Second step. We transform the defining equation of \(m_c^*(p)\). \[ m^{-p} (m+1)^{p-1} (p-m)=1 \] is equivalent to \[ \left(\frac{p}{m}-1\right)^{\frac{m}{p}}=\left(\left(1+\frac{1}{m}\right)^{m}\right)^{-\left(1-\frac{1}{p}\right)}. \] Now if we make the substitution \(m=m_c^*(p)\), and take logarithms, then this last equation becomes \[ L(p) \ln\left(\frac{1}{L(p)}-1\right)=-\left(1-\frac{1}{p}\right)\ln\left(\left(1+\frac{1}{p L(p)}\right)^{p L(p)}\right). \]

Third step. Let us define the function \[ \lambda:\left[\frac{1}{2},1\right)\to (-\infty,0] \] by \(\lambda(x):=x\ln\left(\frac{1}{x}-1\right)\). Since \[ \lambda^{\prime\prime}(x)=-\frac{1}{x(x-1)^2}<0, \] \(\lambda^\prime\) is strictly decreasing. But \[\lambda^\prime\left(\frac{1}{2}\right)=-2<0,\] so \(\lambda^\prime<0\), hence \(\lambda\) is strictly decreasing. Its inverse exists, is continuous and denoted by \[ \lambda^{[-1]}:(-\infty,0]\to \left[\frac{1}{2},1\right). \]

Fourth step. Now the last equality in the second step can be written as \[ L(p)=\lambda^{[-1]}\left( -\left(1-\frac{1}{p}\right)\ln\left(\left(1+\frac{1}{p L(p)}\right)^{p L(p)}\right)\right). \] Since \(L(p)\ge \frac{1}{2}\), \(p L(p)\to +\infty\) as \(p \to +\infty\). But taking into account \(\lim_{x\to+\infty}\left(1+\frac{1}{x}\right)^x=e\) and the continuity of \(\lambda^{[-1]}\), the right-hand side converges to \(\lambda^{[-1]}(-1)\), so the left-hand side should also converge.

Fifth step. We have proved that \(L:=\lim_{p\to+\infty}L(p)=\lambda^{[-1]}(-1)\). In other words, \(\lambda(L)=-1\), that is \[ \frac{1}{L}-1=e^{-\frac{1}{L}}, \] or \[ \frac{1}{e}=\left(\frac{1}{L}-1\right) e^{\frac{1}{L}-1}, \] hence \[ \frac{1}{L}-1=W\left(\frac{1}{e}\right). \]


Remark. According to numerical tests, we have \(L(p)\le L(p+1)\) for each \(p\), but we could not establish this fact rigorously.

Remark. \(L=\frac{1}{1+W\left(\frac{1}{e}\right)}\approx 0.78218829428\).

Remark. By using \(m=L p\) and the (first terms of the) asymptotic expansion of the factorial (more precisely, the gamma function) around \(p=+\infty\), we get that \[ \max_{2\le m\le p} F_p(m) \] is asymptotically \[ \frac{1+W\left(\frac{1}{e}\right)}{2 \pi \sqrt{W\left(\frac{1}{e}\right)}}\frac{\left(\frac{1}{W\left(\frac{1}{e}\right)}\right)^p}{p} \approx 0.385588\cdot \frac{3.59112^p}{p}. \]

Remark. A “continuous version” of the above results is described at this link.