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?
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.