Coconuts and a Monkey 2
Previous puzzle in this series
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 54 of what they found (including bonus coconuts). After all 5 people take their shares, the pile has been multiplied by: (54)5=31251024
If we start with N+4 coconuts (real pile plus bonus), we end with: (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) to be divisible by 55=3125, the smallest value is N+4=3125.
Therefore: N=3125−4=3121 coconuts.
Using the “bonus coconuts” perspective: Start with 3121+4=3125. After 5 divisions: 3125×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:
- First person finds 3,121. Gives 1 to monkey, leaving 3,120. Divides: 3120÷5=624 per portion. Takes 624, leaves 3120−624=2496
- Second person finds 2,496. Gives 1 to monkey, leaving 2,495. Divides: 2495÷5=499 per portion. Takes 499, leaves 2495−499=1996
- Third person finds 1,996. Gives 1 to monkey, leaving 1,995. Divides: 1995÷5=399 per portion. Takes 399, leaves 1995−399=1596
- Fourth person finds 1,596. Gives 1 to monkey, leaving 1,595. Divides: 1595÷5=319 per portion. Takes 319, leaves 1595−319=1276
- Fifth person finds 1,276. Gives 1 to monkey, leaving 1,275. Divides: 1275÷5=255 per portion. Takes 255, leaves 1275−255=1020
- Morning division: 1020÷5=204 coconuts per person.
The answer is 3121 coconuts.
Try These Next
Traversing the Hypercube
Ossarion-429 is a multi-dimensional being travelling across hypercubes of various dimensions. Bored and having nothing else to do, he wonders to himself if...
Equal Shape Cutting 2
Cut the L-shape into 4 equal shapes of itself. The shapes can be rotated, but all 4 must be of the same size.
Guessing Hats 1
Angry with his three wise men, the evil king subjects them to an impossible task: they’ll have to guess the colour of the hats on their heads. If any one of...