Solved

# Cocunut tree

Posted on 2008-10-27
331 Views
a question of coconuts..
An island is inhabited by 5 men and a pet monkey. One afternoon the men gathered a large pile of coconuts, which they proposed to divide equally among themselves the next morning.
During night one of the men awoke and on dividing the nuts into 5 equal parts he found that there was one nut left over which he gave to the monkey. He then hid his one-fifth share.
Later another man awoke with the same idea in mind. He went to the pile, divided into 5 equal parts, and found one nut left over which he gave to the monkey and then hid his 1/5th share.
During the same night, each of the three men arose, went to the pile, and followed the same procedure. Each time one cocnut was left over, and given to monkey.
The next morning, all 5 men went to the diminished pile and divided into 5 equal parts, finding that one coconut remained over which they gave to the monkey.
What is the least number of nuts the original pile could have contained?
0
Question by:jaisonshereen
• 4
• 3
• 3
• +3

LVL 84

Expert Comment

ID: 22819482
0

LVL 43

Expert Comment

ID: 22819980
3121
0

LVL 84

Accepted Solution

ozo earned 250 total points
ID: 22820059
n * 5^5 - 4
According to the discussion in another question, negative coconuts can't exist,
and 6246 is larger than 3121
0

LVL 31

Expert Comment

ID: 22822846
6 events:
a=5x+1
b=5(a)+1
c=5(b)+1
d=5(c)+1
e=5(d)+1
f=5(e)+1

a=5x+1
b=25x+6
c=125x+31
d=625x+156
e=3125x+781
f=15625x+3906

for x=1
a=6
b=31
c=156
d=781
e=3906
f=19531

Answer: 19,531 coconuts in the original pile.
0

LVL 43

Expert Comment

ID: 22823181
Paranormastic, Isnt that ridiculous? Unless 3121 is a wrong answer how can 19531 be the minimum, possible?

Saqib
0

LVL 31

Expert Comment

ID: 22823497
Oops, thought through this one wrong...  Ozo would be correct.
3121 total
2496 =4/5 of 3121-1
1996 =4/5 of 2496-1
1596 =4/5 of 1996-1
1276 =4/5 of 1596-1
255 =1/5 of 1276-1
0

LVL 31

Expert Comment

ID: 22823502
I just wanted more coconut cream pie!
0

LVL 43

Expert Comment

ID: 22823597
;-)
0

LVL 50

Expert Comment

ID: 22826771
Surely all 5 of the men divide the coconuts...and then there's a further division by 5.....which means that the number is 15621
0

LVL 15

Expert Comment

ID: 22827201
0

LVL 43

Expert Comment

ID: 22827971
Is that smaller than 3121?
0

LVL 50

Assisted Solution

barry houdini earned 250 total points
ID: 22829633
In my view 15621 is the answer to the question

That's the least number of nuts that the original pile could have contained

If there were 3121 coconuts to start then after the first man gives one to the monkey and takes away a fifth there will be 2496 left

After man 2 gives 1 to the monkey and takes away a fifth there will be 1996
After man 3 gives 1 to the monkey and takes away a fifth there will be 1596
After man 4 gives 1 to the monkey and takes away a fifth there will be 1276
After man 5 gives 1 to the monkey and takes away a fifth there will be 1020

But this amount left needs to be (5*n)+1 where n is an integer, which it isn't

15621
12496
9996
7996
6396
5116

So 5116 coconuts are left in the morning. The monkey gets one and each man has 1023

0

LVL 18

Expert Comment

ID: 22830130
0

LVL 18

Expert Comment

ID: 22830135
that didn't work, but i made a script that came up with 15621

``````javascript:coc();function coc() {        var ok = false;    for(var c = 1; c < 50000 ; c++)    {        var itest = c;        for(var r=0; r < 6;r++)    {             itest = reduce(itest);                if (itest == -999) break;                 if (r == 5) {alert(String(c));ok=true;}}if (ok) break;    }        }    function reduce(x){    if ((x-1) % 5 == 0)return 4 * (x - 1) / 5;return -999;}
``````
0

LVL 18

Expert Comment

ID: 22830137
cut and paste above script into firefox url line
0

## Featured Post

### Suggested Solutions

A Guide to the PMT, FV, IPMT and PPMT Functions In MS Excel we have the PMT, FV, IPMT and PPMT functions, which do a fantastic job for interest rate calculations.  But what if you don't have Excel ? This article is for programmers looking to reâ€¦
This article seeks to propel the full implementation of geothermal power plants in Mexico as a renewable energy source.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidtâ€¦
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: â€¦