The wise old man was annoyed by the sultan's request but consented to show him a new game played on a sixty-four square board. That game was the oldest predecessor of chess called Shatranj. The Vizier taught the members of the court how to play the game and they immediately brought it to the Sultan. The Sultan learned to play and beat all the members of his court quite easily. You see, the members of the court were afraid that if they beat the Sultan they would lose their lives from his anger.
The Sultan puffed up by his numerous victories declared that if any man in all of India could beat him he would give the winner anything they desired. The wise old Vizier had had enough and immediately accepted the Sultan's impulsive challenge. The Vizier took his time to win the game as he enjoyed the pained demeanor of the foolish Sultan. Eventually, the Vizier won the game. The Sultan with a gracious nod tried to hide his anger and asked the Vizier what he wanted for his reward.
“I want only enough grains of rice to fill the board we played the game on.” replied the Vizier.
“You must be joking, do you mock my wealth?” the Sultan shot back.
“No, great Sultan. I simply ask for one grain of rice in the first square on the board today, and then double that number every day thereafter until all the squares are filled. Two grains in the second square tomorrow, four grains in the third square on the next day, and so on.” replied the Vizier humbly.
“This is nothing to me!” said the Sultan confidently and granted the Vizier's wish.
By the sixth day the Vizier accepted his meager reward of one hundred and twenty-eight grains of rice. The Sultan could not resist his pride and made fun of the Vizier.
“You were wise to win the contest but this meager reward was a foolish request!” the Sultan would say among other similar remarks.
“Dear Sultan,” replied the Vizier, “Before you get to the last square on the board the whole of the kingdom will run short of rice and you will not be able to pay me my reward.”
The Sultan at first did not believe the Vizier and demanded that the amount of rice due to the Vizier be counted. It was found that to double the amount of rice until all sixty-four squares were filled would result in 18,446,744,073,709,551,615 grains of rice! Far more than all the rice available in India or even in the world! There was no way to repay the debt and the Sultan fell to his knees in despair beginning to weep at his foolishness. The Vizier could see that the Sultan was humbled by the lesson and forgave the debt. From that day the Sultan ruled more wisely and always remembered what his pride had cost him.