What is the rigorous proof for the formula used to determine the number of bananas at the end of each day?

83 Views Asked by At

A merchant have a stock that contains $x$ bananas. In the first day, they eat one and sell $1/2$ of the rest. In the second day, they eat $2$ and sell $2/3$ of the rest. In the third day, they eat $3$ and sell $3/4$ of the rest, etc. In the sixth day, the merchant realized that they only have 6 bananas left. How many bananas did the merchant have on the first day?

My approach: when I was trying to determine the rest of bananas they had in the end of each day, I realized something: The rest at the end of the first day: $\frac{x-1}{2}$ The rest at the end of the second day: $\frac{x-5}{6}$. The rest at the end of the third day: $\frac{x-23}{24}$. Which means the the rest of bananas at the end of each day can always be written as:

$$\frac{x-y}{y+1},$$

where $x$ is the number of bananas, which means that the rest at the end of the fifth day is:

$$\frac{x-719}{720}.$$

Then I solved the equation $\frac{x-719}{720}=6$ to determine the number of bananas they initially had, and the result was

$$x=5039.$$

My question is: is there a simple rigorous proof for the formula I conjectured? If so, what is it?

2

There are 2 best solutions below

0
On

So I am assuming you are asking for a proof of the following statement: Given the initial number of bananas $x$, the number of bananas they had at the end of day $y$ is $$\frac{x - ((y+1)! - 1)}{(y+1)!}.$$

(In your question, you didn't really say what $y$ is.)

Well, let's do induction. Clearly, as you determined, it holds for $y = 1$. So, let us now do the induction step $y \rightsquigarrow y + 1$. On the $y+1$-th day, they eat $y +1$ bananas and then sell $(y+1) / (y+2)$ of the rest. So, the number of bananas at the end of the $(y + 1)$-st day is

\begin{align*} \frac{\frac{x - ((y+1)! - 1)}{(y+1)!} - (y+1)}{y+2} &=\frac{x - ((y+1)! - 1)}{(y+2)!} - \frac{(y+1) \cdot (y+1)!}{(y+2)!} \\ &= \frac{x - ((y+1)! - 1 +(y+1) \cdot (y+1)!)}{(y+2)!} \\ &= \frac{x - ((y+2)\cdot (y+1)! - 1)}{(y+2)!} \\ &= \frac{x - ((y+2)! - 1)}{(y+2)!}. \end{align*}

This completes the induction step.

4
On

The number $x_n$ of the rest at the end of the $n$th day follows the rule: $$x_0=x,\quad x_n=\frac{x_{n-1}-n}{n+1}.$$ The auxilary sequence $y_n:=x_n+1$ therefore satisfies $$y_0=x+1,\quad y_n=\frac{y_{n-1}}{n+1},$$ i.e. $$y_n=\frac{x+1}{(n+1)!},$$ whence $$x_n=\frac{x-\left((n+1)!-1\right)}{(n+1)!}.$$

Edit, to adress the comments. If $x_N=0$ for some $N$ (in your puzzle, $N=6$) then the sequence stops and $x=(N+1)!-1$ (in your puzzle, $x=7!-1=5039$, as you rightly guessed), and $$\forall n\in\{0,1,\dots,N-1\},\quad x_n=\frac{(N+1)!}{(n+1)!}-1\in\Bbb N.$$