The Monkey and the Coconuts
I'd also be interested in general answers to these, with N
This first problem dates from the early 20th century. Five
sailors find themselves washed ashore after a shipwreck. They
realize they'll need food, so they spend all day gathering
coconuts. Tired, they go to sleep, agreeing to divide the
coconuts in the morning.
One sailor wakes up in the night, and since he doesn't quite
trust the others, he decides to take his share. He divides the
coconuts into five piles. Finding one coconut left over, he
gives it to a monkey watching nearby. He then hides his pile
and pushes the remaining four piles into one large pile
and goes back to sleep.
Each of the other four sailors wakes up in the night and repeats
the actions of the first sailor. After dividing the pile, each
finds one extra coconut, which he gives to the monkey.
In the morning, the pile of coconuts is noticeably smaller, but
since each is at fault, no one mentions it. They divide the
remaining coconuts evenly among themselves.
How many coconuts did the five men originally gather?
This is my own variation on the above problem. The nighttime
ritual for each of the sailors finds each taking and hiding
one-fifth of the coconuts, plus one-fifth of a coconut.
(Sorry, no monkeys this time.) In the morning, they again divide
the pile evenly. If no coconuts are cut, how many did they
Source: 1. Many sources. 2. Original.
Sorin Ionescu sent this related problem:
3) We don't know the number of sailors and coconuts. The first
sailor takes one coconut and one-eleventh of the rest of
coconuts. The second sailor takes two coconut and one-eleventh
of the rest of coconuts. The third sailor takes three coconut
and one-eleventh of the rest of coconuts and so on. In the
morning there were no coconuts. How many coconuts and
sailors were there?
(I answered "1", and he asked for a little more interesting solution.)
Solutions were received from
One person pointed out that the solution to the first problem is
already on the web. Some are at
Eric's Treasure Trove of Mathematics, and
The solutions are:
I found it interesting that if you set m=-1 in problem 2, you
get a [negative] number remarkably similar to the minimum (k=0)
number of problem 1. No one else pointed this out, so I guess
it wasn't as interesting as I thought...
- 3121 + 15625k Coconuts
- 12499 + 15625m Coconuts
The general formulae are:
Note: N@2 means N mod 2
- if even : N^N * (N-1) - N + 1
- if odd : N^N - N + 1
- combined: N^N * [1 + ABS(N@2 - 1) * (N - 2)] - N + 1
- Part 2:
- if even : N^N - 1
- if odd : N^N * (N - 1) - 1
- combined: N^N * [1 + N@2 * (N - 2)] - 1
Mail to Ken