Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Puzzle time!

Name: 4tran 2008-10-22 4:42

5 monkeys gather a pile of N peaches.  They agree to divide the peaches the following day.  Monkey A wakes up before the others, and wants some peaches, so he divides the peaches up evenly.  There's a leftover peach, so he rewards himself for his efforts.  He takes his share and leaves.  A gust of wind then combines the remaining 4 piles into 1.  Monkey B wakes up, and not knowing of A's actions, proceeds to do the same thing.  The same happens for the other 3 monkeys.  There are Q peaches after the final monkey takes his share.

Assuming no fractional peaches are involved, what is the smallest value of N, and the corresponding value of Q?  If you did this problem in a certain way, you should have an entire set of possible values of N and Q.

Obviously, this problem can be brute forced in various ways.  There is however, a quick and elegant solution.  In fact, this solution generalizes to K monkeys.  Can you find it?

Name: Anonymous 2008-10-22 22:30

>>6
``N ≡ 1 (mod 5)'' means ``N is congruent to 1, modulo 5''.
``N = 1 mod 5'' means ``N equals 1 modulo 5'', which is 1.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List