Site hosted by Angelfire.com: Build your free website today!

Five Thieves Problem Generalised

The problem goes like this:


A certain number of thieves steal a certain number of gold coins. Tired after their theft, they decide to sleep on it, and divide the money in the morning. However, they don't trust each other. So the first thief wakes up and divides the money into exactly as many shares as there are thieves, but there is one extra coin left over. He takes one share and the extra coin! All through the night, each thief wakes up in turn and does the same thing: divides the money into exactly as many shares as there are thieves with one coin left over and takes one share and the extra coin. In the morning when they all wake up, the money divides perfectly amongst the thieves. How much money was there?



To know how many gold coins there were:

Type the number of thieves in this box
Enter the number of desired solutions in this box

Please note that if nothing happens after pressing the calculate button, you probably:

  1. asked for too many solutions!
  2. entered a too large number of thieves
and the solutions are too large for the program. Just hit the reload button and try again!
And here is a link for the original problem at the Math Forum

pic 1 b1

pic 2 b2

pic 3 b3

pic 4 b4

pic 5 b5

baby me ouch

Saracu tati ouch

tata lucru hmmm