Sailors, monkey and coconuts

9k Views Asked by At

Five sailors and a monkey were shipwrecked on a deserted island, and they spent the first day gathering coconuts for food, piled them all up together and went to bed. But when they were all asleep one sailor woke up, and he thought that there might be a row about dividing the coconuts in the morning, so he decided to take his share. He divided the coconuts into five piles. He had one coconut leftover, and he gave that to the monkey, and he hid his pile and put the rest back together. By and by the next sailor woke up and did the same thing. And he had one leftover, and he gave it to the monkey. And all five sailors did the same thing one after another. Each taking a fifth of the coconuts in the pile, and each having one leftover for the monkey. In the morning they divided the coconuts that were left and they came out in five equal shares and one coconut leftover and gave that to the monkey. How many coconuts were there in the beginning?

1

There are 1 best solutions below

0
On BEST ANSWER

According to MathWorld, the smallest positive solution is $15621$ coconuts. The smallest positive solution if the coconuts divide evenly at the end, with none left over for the monkey, is $3121$. The link gives an outline of the solution to this classic Diophantine problem. A detailed solution can be found in this PDF, alone with the slick shortcut solution:

By inspection $-4$ is a solution: when it’s divided into $5$ piles of $-1$ with $1$ left over for the monkey, and one of the piles is removed, $-4$ coconuts remain for the next division. It’s also not too hard to see that $5^6=15625$ can be added to any solution to obtain another, since the pile is divided into $5$ piles $6$ times; thus, $15621$ is a solution.