Back

Coconuts and a Monkey 1

Medium
Created: February 4, 2026Updated: February 5, 2026

Ten people are stranded on a deserted island. The gather a pile of coconuts for food, planning to divide them equally the next day. However, that night, one person wakes up and tries to take their share early. When dividing the pile into ten equal portions, they find they’re one coconut short. They notice the monkey holding one coconut and try to take it, but the monkey kills them with it.

Later, a second person wakes up. Finding the first person dead, they try to divide the pile into nine equal portions, but again find they’re one coconut short. They try to take the monkey’s coconut and are also killed.

This continues for the rest of the morning. Each remaining person wakes up, finds one fewer person alive, tries to divide the pile equally among the survivors, finds they’re one coconut short, and is killed trying to take the monkey’s coconut, until finally there is only one survivor.

What is the smallest number of coconuts in the original pile (not counting the monkey’s coconut)?

Solution

Answer: 2519 coconuts

The key insight is that the pile stays the same size throughout—each person gets killed before taking any coconuts. So we need a single number that is “one coconut short” when dividing by 10, then by 9, then by 8, and so on down to 1.

If the pile had one more coconut, it would be evenly divisible by all these numbers: 10, 9, 8, 7, 6, 5, 4, 3, 2, and 1.

The smallest number divisible by all of these is their least common multiple (LCM).

To find the LCM of numbers from 1 to 10, we only need to consider the primes: 2, 3, 5, and 7.

For each prime, we find the highest power that doesn’t exceed 10:

  • The largest power of 2 not exceeding 10 is 8=238 = 2^38=23
  • The largest power of 3 not exceeding 10 is 9=329 = 3^29=32
  • The largest power of 5 not exceeding 10 is 5=515 = 5^15=51
  • The largest power of 7 not exceeding 10 is 7=717 = 7^17=71

So: lcm(1,2,,10)=23×32×5×7=8×9×5×7=2520\text{lcm}(1, 2, …, 10) = 2^3 \times 3^2 \times 5 \times 7 = 8 \times 9 \times 5 \times 7 = 2520lcm(1,2,,10)=23×32×5×7=8×9×5×7=2520

Since the pile needs to be one short of this number: N=25201=2519N = 2520 - 1 = 2519N=25201=2519

We can verify: 2519÷10=2512519 \div 10 = 2512519÷10=251 remainder 999 (one short), 2519÷9=2792519 \div 9 = 2792519÷9=279 remainder 888 (one short), and so on.

Try These Next