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

90.91% Correct | 9.09% Incorrect
Last Solution submitted on Aug 12, 2025

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers9

Suggested Problems

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!