0

I was looking at the ratio $$\frac{k!}{k^k} =\frac{1*2*3*...*k}{k*k*k*...*k}<1$$ and I wondered how large of a factorial I would need to make the ratio greater than one. So, $$\frac{n!}{k^k} =\frac{1*2*3*...*k*...*n}{k*k*k*...*k}>1$$ I have found that since $$\frac{(2k)!}{k^k}=\frac{1*2*3*...*k*...*2k}{k*k*k*...*k}$$the right half of the factors in the numerator are all greater than $k$, and we have that ${(2k)!}>{k^k}$.

Therefore, n is bounded by $$k<n<2k.$$ I have attempted to improve these bounds but have not been able to make progress.$$$$ I started with the inequality:$$k^k<n!$$ and taking the log of both sides gives $$k*log(k)<log(n!)$$ From here, Stirling's Approximation takes away the factorial and replaces it with $$k*log(k)<n*log(n)-n+O(log(n))$$ After playing around with this last inequality for a while, I still have not been able to make improvements on the original bounds. How could I go about doing this? Thank you.

JHCW
  • 33
  • I don't think your last inequality will improve the bound you have already set, since I feel the $2k$ one is much stronger (the one that comes from the stirling approximation is on the order of $e \cdot k$) – Francisco José Letterio Sep 17 '19 at 22:46

2 Answers2

1

We have $$k \log (k) = n (\log (n)-1) + \frac 12\log(2\pi n)\\ n=\frac {k \log(k)- \frac 12\log(2\pi n)}{\log(n)-1}$$ We can bound $n$ by removing the negative term in the numerator and reducing the denominator, so $$n\lt \frac {k\log(k)}{\log(k)-1}$$ This appears to be reasonably close as $k$ gets larger. For $k=20$ it gives $n \approx 30$ where $26! \gt 20^{20}$ and for $k=50$ it gives $n \approx 67$ where $62! \gt 50^{50}$ You can get a better result by iterating to convergence. Let $n_0$ be the result from above, then iterate $$n_{i+1}=\frac{k\log(k)-\frac 12 \log(2 \pi n_i)}{\log(n_i)-1}$$ and round up. It looks like it works starting at $k=7$, though convergence is slow there. Convergence speeds up as $k$ gets larger.

Ross Millikan
  • 374,822
0

If you look at this question, you will see the magnificent approximation proposed by @rohjohn (an eminent user on this site) for the inverse of the factorial.

Applied to your case, this would write

$$n \sim e\exp\left(\operatorname{W}\left(\frac1{e}\log\left(\frac{k ^k}{\sqrt{2\pi}}\right)\right)\right)-\frac12$$ where appears Lambert function. For sure, you need to use $\lceil n\rceil$.

Applied to a few cases $$\left( \begin{array}{cc} k & n \\ 5 & 7 \\ 10 & 14 \\ 15 & 20 \\ 20 & 26 \\ 25 & 32 \\ 30 & 38 \\ 35 & 44 \\ 40 & 50 \\ 45 & 56 \\ 50 & 62 \\ 55 & 68 \\ 60 & 74 \\ 65 & 80 \\ 70 & 86 \\ 75 & 92 \\ 80 & 98 \\ 85 & 104 \\ 90 & 109 \\ 95 & 115 \\ 100 & 121 \end{array} \right)$$ which is very close to a straight line.

Generating values up to $k=1000$, a linear regression $n=a+ b k$ gives with $R^2=0.999965$ $$\begin{array}{clclclclc} \text{} & \text{Estimate} & \text{Standard Error} & \text{Confidence Interval} \\ a & 8.89874 & 0.27580 & \{8.35486,9.44263\} \\ b & 1.13730 & 0.00048 & \{1.13636, 1.13823\} \end{array}$$

Trying for $k=1000$ $(1000^{1000}=10^{3000})$, the regression would give $n=1146$ while the formula leads to $n=1143$. Checking $$1142! = 6.58 \times 10^{2997} \qquad \qquad 1143! = 7.52 \times 10^{3000}$$