Five sailors and their monkey were washed ashore on a desert island. They decide to go get coconuts that they pile up. During the night, each of the sailors, suspicious the others wouldn't behave fairly, went to the pile of coconuts take their fair share. How many coconuts were there in the beginning..?

I am excited to tell you that I just released the alpha version of my “Pydont's” book, a book that compiles all my “Pydon't” articles. You can get the book at leanpub:

A photograph of some coconuts, courtesy of user "zibik" from

Problem statement

A group of five sailors and a monkey wash ashore on a desert island. After the initial shock subsided, they decided the best thing to do was to gather supplies for the upcoming days. They split up and when they got back together, the only thing they managed to find was coconuts, that they piled up, before deciding to go get some sleep.

In the middle of the night, the first sailor -- who was suspicious the others wouldn't be fair in the division of the coconuts -- went to the pile of coconuts to divide it evenly in five and get their fair share. When the sailor divided the pile, they realised there was an extra coconut that could not go in any pile, so they gave it to the monkey, and then took a fifth of the remaining coconuts and went to sleep.

A while later, the second sailor did the same. They went to the coconut pile and divided it evenly in five parts, only to find out there was one coconut too many. The sailor gave that coconut to the monkey, took a fifth of the remaining coconuts and then went to bed.

This happened for the other three sailors as well: all of them woke up, went to the coconut pile and divided it in five, gave a coconut in excess to the monkey and then took exactly one fifth of the remaining coconuts before heading back to sleep.

What is the minimum number of coconuts that there had to be in the pile in order for this to be possible?

Give it some thought...

If you need any clarification whatsoever, feel free to ask in the comment section below.


You can read the solution here to compare with your own solution. You can also use that link to post your own solution in the comments! Please do not post spoilers in the comments here.

If you enjoyed the problem and would like to get new problems directly in your inbox, be sure to subscribe to the Problems newsletter.

If you liked this article and would like to support the mathspp project, then you may want to buy me a slice of pizza 🍕.

Previous Post Next Post

Blog Comments powered by Disqus.