### Brain Teasers

# Coconut Craziness

After being marooned on an island, a group of five people spent some time obtaining a lot of coconuts. After the five have decided that they have collected enough coconuts to last long enough for rescuers to arrive, they place all coconuts in a communal pile.

However, the first person suddenly had concerns about how the group would divide the coconuts the following day. In the dead of the night, the first survivor divided the pile into five equal piles of whole coconuts, gave one remaining coconut to a passing monkey, hid their share of the coconuts (one-fifth of the pile), and mixed the four other piles to cover his tracks before going back to sleep.

The second survivor had the same exact train of thought, and proceeded to divide the pile into five equal piles of whole coconuts, give one remaining coconut to a passing monkey, hide their share of the coconuts (one-fifth of the pile), and mix back together the other four piles before going back to sleep.

In an ironic twist of fate, the other three survivors also had the same line of reasoning as the other two survivors and proceeded to do exactly the same thing (divide the pile, give one remaining coconut to a passing monkey, etc.). In a twist of fate, none of the survivors woke up to the other survivors taking their share from the pile.

When the group woke up in the morning, everyone could see that the pile was substantially reduced, but since every survivor took from the pile, no one said anything to incriminate themselves. Nonetheless, the survivors divided the reduced pile of coconuts into five equal shares of whole coconuts one last time, this time without any remaining coconuts to give to any monkeys.

What is the least number of whole coconuts the pile can have before the night?

However, the first person suddenly had concerns about how the group would divide the coconuts the following day. In the dead of the night, the first survivor divided the pile into five equal piles of whole coconuts, gave one remaining coconut to a passing monkey, hid their share of the coconuts (one-fifth of the pile), and mixed the four other piles to cover his tracks before going back to sleep.

The second survivor had the same exact train of thought, and proceeded to divide the pile into five equal piles of whole coconuts, give one remaining coconut to a passing monkey, hide their share of the coconuts (one-fifth of the pile), and mix back together the other four piles before going back to sleep.

In an ironic twist of fate, the other three survivors also had the same line of reasoning as the other two survivors and proceeded to do exactly the same thing (divide the pile, give one remaining coconut to a passing monkey, etc.). In a twist of fate, none of the survivors woke up to the other survivors taking their share from the pile.

When the group woke up in the morning, everyone could see that the pile was substantially reduced, but since every survivor took from the pile, no one said anything to incriminate themselves. Nonetheless, the survivors divided the reduced pile of coconuts into five equal shares of whole coconuts one last time, this time without any remaining coconuts to give to any monkeys.

What is the least number of whole coconuts the pile can have before the night?

### Hint

The stranded survivors are not particularly great at math, so the first survivor placed four rotten coconuts as aides to help split the counting pile evenly. Each survivor after also uses the rotten coconuts to help calculate how to split the pile evenly despite there being one spare coconut that will be given to the monkey.Of course, being rotten coconuts, these coconuts are put to the side after all the divisions, as no pirate wants to put them in the pile or their stash of coconuts.

### Answer

First, we start with 5^5 coconuts. This is the smallest number that can be divided evenly into fifths, have a fifth removed and the process repeated five times, with no coconuts going to the monkey.Four of the 5^5 coconuts are rotten and placed aside. When the remaining supply of coconuts is divided into fifths, there will of course be one non-rotten coconut left over to give to the monkey.

After the first person has taken his share, and the monkey has his coconut, we put the four rotten coconuts back with the others to make a pile of 5^4 coconuts. This can be evenly divided by 5. Before making this next division, however, we again put the four rotten coconuts aside so that the division will leave an extra coconut for the monkey.

This procedure - borrowing the rotten coconuts only long enough to see that an even division into fifths can be made, then putting them aside again - is repeated at each division. After the sixth and last division, the rotten coconuts remain on the side, the property of no one.

The rotten coconuts aren't actual coconuts, since they end up the property of no one, but since we see that 5^5 coconuts can be divided neatly with the use of the four rotten coconuts, the answer is 5^5 - 4, or 3121 coconuts.

Alternatively, we can set up a system of equations to solve the problem. For each step, we can establish a system of equations:

F = (N5)/5

N5 = 4(N4)/5 - 1

N4 = 4(N3)/5 - 1

N3 = 4(N2)/5 - 1

N2 = 4(N1)/5 - 1

N1 = 4(N)/5 - 1

F is the final share of coconuts, and N is the initial pile of coconuts. N1 corresponds to the pile after the first survivor was done taking their share, N2 corresponds to the pile after the second survivor was done taking their share, and so on and so forth.

Substitution results in the following equation:

(4^5)N = (5^6)F + (4 * 5^5) - 4^6

or

1024N = 15625F + 8404

Given that N and F must be positive integers, this equation can be solved with brute force or modular arithmetic to yield 3121.

Hide Hint Show Hint Hide Answer Show Answer

## What Next?

View a Similar Brain Teaser...

If you become a registered user you can vote on this brain teaser, keep track of which ones you have seen, and even make your own.

### Solve a Puzzle

This brain teaser has no comments.

To post a comment, please create an account and sign in.

## Follow Braingle!