Problem 60968. Monkey and the Peaches
A monkey picked a certain number of peaches on the first day.
Each day, the monkey eats half of the remaining peaches plus one more. This continues every day.
On the x-th morning, the monkey finds only 1 peach remaining before eating.
Write a function that returns the number of peaches the monkey must have picked on day 1, given x, the number of days this routine lasted.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers9
Suggested Problems
-
9 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!