We know $0 < a \le {1 \over 2}$ and $0 < b \le
{1 \over 2}$. I need a good upper
bound for the smallest integer $n \gt 0$ such that:
$$\frac{a^n}{n!} \le b$$
Probably related to the birthday problem,
but motivation is some numerics.
We know $0 < a \le {1 \over 2}$ and $0 < b \le
{1 \over 2}$. I need a good upper
bound for the smallest integer $n \gt 0$ such that:
$$\frac{a^n}{n!} \le b$$
Probably related to the birthday problem,
but motivation is some numerics.
Notice that it is trivial if $a<b$, since
$$\frac{a^1}{1!}<b$$
So the real problem is $0<b<a\le\frac12$. The simplest upper bound:
$$\frac{a^n}{n!}\le a^n\le b\implies n\le\log_a(b)$$
A stronger upper bound using Stirling:
$$\frac{a^n}{n!}\le\frac{(ae)^n}{n^n}\le\left(\frac{ae}2\right)^n\le b$$
$$n\le\log_{ae/2}(b)$$
where $e\approx2.71828$