13 pirates (including the captain) are sitting down at a table in a tavern. All eyes are on the pile
of gold coins at the center (their day's plunder). The captain is a fair man and decides to distribute the
coins equally. He hands out the coins one by one to each of the pirates (including himself). There are
3 extra coins though at the end. A fight ensues over how the remaining coins should be divided. A
particularly violent pirate is kicked out by the owner of the tavern, leaving behind his share of coins
on the table. The captain takes the ousted pirate's coins along with the 3 extra coins and distributes
them equally as before to the 12 remaining pirates (including himself). Once again, there are extra coins
at the end, 5 this time! Tempers flare once more on how the remaining coins should be divided. Fearing
another brawl, the captain kicks out the loudest pirate, leaving behind his share of coins on the table as
before. The captain takes the newly ousted pirate's coins along with the 5 extra coins and distributes
them to the remaining 11 pirates (including himself). Thankfully there are no extra coins this time.
Afterwards, the captain wonders how many gold coins there were at the beginning. He knows for sure that
there were less than 1000. Can you figure out how many gold coins there were in all?
(Retelling of a puzzle by Robert B., NSA Applied Mathematician)
Do you have a suggestion
for this puzzle (e.g. something that should
be mentioned/clarified in the question or solution, bug, typo, etc.)?