According to legend, once every thousand years a host of sea monsters emerges from the depths to demand tribute from the floating city of Atlantartica. As the ruler of the city, you’d always dismissed the stories… until today, when they rose out of the roiling waters, surrounded your city and demanded a ransom of pearls. Can you figure out which chest of pearls is the ransom? Dan Finkel shows how.

**Transcript:**

According to legend, once every thousand years a host of sea monsters emerges from the depths to demand tribute from the floating city of Atlantartica. As the ruler of the city, you’d always dismissed the stories… until today, when 7 Leviathan Lords rose out of the roiling waters and surrounded your city. Each commands 10 giant kraken, and each kraken is accompanied by 12 mermites. Your city’s puny army is hopelessly outmatched.

You think back to the legends. In the stories, the ruler of the city saved his people by feeding the creatures a ransom of pearls. The pearls would be split equally between the leviathans lords. Each leviathan would then divide its share into 11 equal piles, keeping one, and giving the other 10 to their kraken commanders. Each kraken would then divide its share into 13 equal piles, keeping one, and distributing the other twelve to their mermite minions. If any one of these divisions left an unequal pile or leftover pearl, the monsters would pull everyone to the bottom of the sea. Such was the fate of your fabled sister city.

You rush to the ancient treasure room and find five chests, each containing a precisely counted number of pearls prepared by your ancestors for exactly this purpose. Each of the chests bears a number telling how many pearls it contains. Unfortunately, the symbols they used to write digits 1,000 years ago have changed with time, and you don’t know how to read the ancient numbers. With hundreds of thousands of pearls in each chest, there’s no time to recount.

One of these chests will save your city and the rest will lead to its certain doom. Which do you choose?

There isn’t enough information to decode the ancient Atlantartican numeral system. But all hope is not lost, because there’s another piece of information those symbols contain: patterns. If we can find a matching pattern in arabic numerals, we can still pick the right chest.

Let’s take stock of what we know. A quantity of pearls that can appease the sea monsters must be divisible by 7, 11, and 13. Rather than trying out numbers at random, let’s examine ones that have this property and see if there are any patterns that unite them. Being divisible by 7, 11, and 13 means that our number must be a multiple of 7, 11, and 13. Those three numbers are all prime, so multiplying them together will give us their least common multiple: 1001. That’s a useful starting place because we now know that any viable offering to the sea monsters must be a multiple of 1001.

Let’s try multiplying it by a three digit number, just to get a feel for what we might get. If we try 861 times 1001, we get 861,861, and we see something similar with other examples.

It’s a peculiar pattern. Why would multiplying a three-digit number by 1001 end up giving you two copies of that number, written one after the other? Breaking down the multiplication problem can give us the answer. 1001 times any number x is equal to 1000x + x. For example, 725 times 1000 is 725,000, and 725 x 1 is 725. So 725 x 1001 will be the sum of those two numbers: 725,725. And there’s nothing special about 725. Pick any three-digit number, and your final product will have that many thousands, plus one more.

Even though you don’t know how to read the numbers on the chests, you can read which pattern of digits represents a number divisible by 1001. As with many problems, trying concrete examples can give you an intuition for behavior that may at first look abstract and mysterious.

The monsters accept your ransom and swim back down to the depths for another thousand years. With the proper planning, that should give you plenty of time to prepare for their inevitable return.