Back

Coconuts and a Monkey 2

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

Five people are stranded on a deserted island. They gather a pile of coconuts for food, planning to divide them equally the next morning. However, during the night, the first person wakes up and decides to take their share early. When dividing the pile into five equal portions, they find one coconut left over. They give this extra coconut to the island’s monkey, take their share, and go back to sleep.

Later, the second person wakes up and, unaware the first has already taken a share, attempts to divide the remaining pile into five equal portions. Again, one coconut is left over, which goes to the monkey. They take their share and return to sleep.

This pattern continues for all five people—each wakes up independently, divides what they find into five equal portions, gives the one leftover coconut to the monkey, takes their share, and goes back to sleep.

Finally, in the morning, all five people gather and decide to divide the remaining pile equally among themselves. This time, the division is perfect—no coconuts are left over for the monkey.

What is the smallest number of coconuts in the original pile?

Solution

Answer: 3121 coconuts

Imagine we secretly add 4 bonus coconuts to the pile at the start. These bonus coconuts never get divided—they’re just invisible extras that make the math work out perfectly.

At each division, here's what happens:

  • A person finds the pile (including the 4 invisible bonus coconuts)
  • They give 1 coconut to the monkey (from the real pile)
  • They divide the remainder into 5 equal portions
  • They take 1 portion and leave 4 portions behind
  • The 4 bonus coconuts remain untouched

The pattern: Each person leaves behind 45\frac{4}{5}54 of what they found (including bonus coconuts). After all 5 people take their shares, the pile has been multiplied by: (45)5=10243125\left(\frac{4}{5}\right)^5 = \frac{1024}{3125}(54)5=31251024

If we start with N+4N + 4N+4 coconuts (real pile plus bonus), we end with: (N+4)×10243125(N + 4) \times \frac{1024}{3125}(N+4)×31251024

For the morning division to work perfectly with no remainder, this final amount must be divisible by 5. Since we need (N+4)(N + 4)(N+4) to be divisible by 55=31255^5 = 312555=3125, the smallest value is N+4=3125N + 4 = 3125N+4=3125.

Therefore: N=31254=3121N = 3125 - 4 = 3121N=31254=3121 coconuts.

Using the “bonus coconuts” perspective: Start with 3121+4=31253121 + 4 = 31253121+4=3125. After 5 divisions: 3125×10243125=10243125 \times \frac{1024}{3125} = 10243125×31251024=1024. In the morning, they divide 1020 coconuts (subtracting the 4 imaginary bonus coconuts), which perfectly divides into 5 portions of 204 each.

Here are the steps laid out:

  1. First person finds 3,121. Gives 1 to monkey, leaving 3,120. Divides: 3120÷5=6243120 \div 5 = 6243120÷5=624 per portion. Takes 624, leaves 3120624=24963120 - 624 = 24963120624=2496
  2. Second person finds 2,496. Gives 1 to monkey, leaving 2,495. Divides: 2495÷5=4992495 \div 5 = 4992495÷5=499 per portion. Takes 499, leaves 2495499=19962495 - 499 = 19962495499=1996
  3. Third person finds 1,996. Gives 1 to monkey, leaving 1,995. Divides: 1995÷5=3991995 \div 5 = 3991995÷5=399 per portion. Takes 399, leaves 1995399=15961995 - 399 = 15961995399=1596
  4. Fourth person finds 1,596. Gives 1 to monkey, leaving 1,595. Divides: 1595÷5=3191595 \div 5 = 3191595÷5=319 per portion. Takes 319, leaves 1595319=12761595 - 319 = 12761595319=1276
  5. Fifth person finds 1,276. Gives 1 to monkey, leaving 1,275. Divides: 1275÷5=2551275 \div 5 = 2551275÷5=255 per portion. Takes 255, leaves 1275255=10201275 - 255 = 10201275255=1020
  6. Morning division: 1020÷5=2041020 \div 5 = 2041020÷5=204 coconuts per person.

The answer is 3121 coconuts.

Try These Next