A week or two (or maybe more) ago, the following question was posted and then deleted just as I was getting to the end of my solution. Unfortunately I have now forgotten what my solution was going to be. I don't think the OP reposted it, so here is a slight variant of it.

A boy has 20 candies in his hand. He eats them one at a time, but each time he puts one in his mouth there is a chance he drops one of those remaining in his hand. That chance is $0.04n$ where $n$ is the number remaining (and independent of everything else). So after eating the first candy there is a 0.76 chance that he is left with only 18 candies in his hand. He never picks up dropped candies. Find the probability that he ends up eating $k$ of the candies.

Part of the fun is the elegance or otherwise of the solution. The series one needs to sum with a plodding approach is not difficult, there is just a (fairly obvious) trap for the overhasty. But it would be good to think of a more elegant approach. I am snowed under with work today, but will try to reconstruct my solution and post it as an answer tomorrow (I am on GMT+1, ie 5 hours ahead of EDT. I hope that is the correct jargon for time in NY.).

Oh, I nice plot always helps. A solution for the general case (replacing 0.04 by a constant $p=\frac{1}{M}$, where $M\ge N$, and 20 by $N$) and any resulting rules of thumb for what was needed for him to eat at least half or whatever would be good too. The more sophisticated could rattle off the related inference problem: assuming your prior belief is that $p$ is uniformly distributed over (1) $[0,1]$, (2) $[0,0.1]$, (3) $[0.9,1]$ (three separate cases) and you observe that he drops $k$, then what is the posterior distribution for $p$?

BTW, aged 66, I don't tend to get given homework. :)

And I don't mind solutions with a software element, provided there is an adequate explanation. Also I have put together three questions of varying difficulty because they are so closely related. So to be clear, I would welcome solutions covering just one of (1) the basic problem (first yellow background above) with 20 candies and $p=0.04$, (2) the more general case with $N$ candies and $p=\frac{1}{M}$, and (3) the inference question (the second yellow background).