There are so many different stories about the original discovery of the chessboard. And many of the stories also involve grains of oats, rice, or barley-corn and the ouster of a king. Which story was first? Which story is true? Was it a king in ancient Persia, a sultan in Turkey, a prince in Babylonia? Some hints even indicate that the basis of the story comes from the Bible.

So what is this story that has piqued the imaginations of so many over such a long period of time? The story has to do with a chessboard, an 8-x-8 game board where knights and kings and pawns can wander (and where clever people can either get rich or lose their heads).

Here are two characters and a representative story from the many available: There’s a king who enlists the help of a local lad to help with some arduous chore. The king offers the lad three pieces of silver for all his hard work — not a payment to sniff at, certainly. The lad ponders for a moment and makes a counteroffer.

He asks whether the king would spread his payments out over the next 64 days, with each day represented by a square on his chessboard. On the first day, the lad would receive one grain of wheat; on the second day, he’d get double that, or two grains of wheat; on the third day, it’s double the second day, or four grains of wheat; and so on. The king was most pleased. He was going to get off easily! Such a stupid lad!

It took a while for the king to catch on. By the 20th day, the total amount of wheat was only about a bushel. But by the 30th day, the total was up to over a thousand bushels. Does that surprise you? Well, do the math. This is the sum of a geometric progression: 1 + 2 + 4 + 8 + . . . + 2^{63}. And the total of that sum is a power of 2 less one: 2^{64} – 1. That comes out to 18,446,744,073,709,551,615. And, figuring about 1 million grains of wheat per bushel, you get over 18 trillion bushels. The king was done for!

Now, there are two endings to this story. One is that the young lad was beheaded. The other is that he became king. The second ending seems much worthier of the lad’s mathematical cunning, don’t you think?