I found a pretty neat mathematical problem inside a videogame (fallout 76). Players have a specific luck value $ l $ and in the game-world there a several machines placed which can or cannot give players a cake when they interact with them. But the chance, that you get a cake is very low.
The wiki says that the game generates a random number (on interact with this machine) between $ 1 $ and $ 1000 $ and when the number is smaller than $2l + \frac{a}{2} $, the cake will be dispensed. And otherwise the cake wont. $ a $ is the number of attempts made to get the cake or differnetly phrased the number of times the player interacted with the machine.
$ l \in \mathbb{N}_+ $ is a constant number and $ a $ is increasing by $ 1 $ with every attempt (which is kind of trivial), which made it hard for me to think about how many times I have to interact with this machine to have a 50% chance of getting at least one successful attempt (I mean the cumulative probability).
When I am not wrong I can calculate the probability of getting a success in one try is $$P(\text{Success first try}) = \frac{4 l + 1}{2000}$$ At first I though about the binomial distribution but as I saw that $ a $ is increasing, i discarded the idea. Does someone have an idea how to find something like a formula to find the cumulative probability when the question would be "How many times does a player have to interact with this machine to have at least a 50% chance of getting at least one cake?"
$$\left[ ~\prod_{i=1}^n ~\left( ~1 - \frac{4l + i}{2000} ~\right) ~\right] ~\leq ~0.5 \iff $$
$$\left[ ~\prod_{i=1}^n ~\left( \frac{2000 - 4l - i}{2000} ~\right) ~\right] ~\leq ~0.5. \tag1 $$
You want the smallest positive integer $(n)$ so that the inequality in (1) above is true. One way of computing $n$ is by logarithms. Note that for $~0 < x < 1,~$ the $~\ln(x)~$ [i.e. natural logarithm of $~x~$ ] is $~< 0.$
The inequality in (1) above will be true, if and only if
$$\left\{ ~\sum_{i=1}^n ~\left[ ~\ln(2000 - 4l - i) - \ln(2000) ~\right] ~\right\} ~\leq ~\ln(0.5). \tag2 $$
Assuming that $(l)$ is a fixed constant, you can easily compute an upper bound for $(n)$ by reasoning that (in general) $\ln(2000 - 4l - i)$ will be moderately smaller than $\ln(2000 - 4l).$
Let $~\displaystyle A = ~\ln(2000 - 4l) - \ln(2000).$
Let $~B = \ln(0.5)$.
Then, an upper bound for $n$ is
$$\left\lceil ~\frac{|B|}{|A|} ~\right\rceil. \tag3 $$
In (3) above, the expression
$\lceil r\rceil$ refers to the smallest positive integer $(n)$ such that $n \geq r.$