There is an old legend about the inventor of chess and a king who offered him any reward. The inventor asked for something seemingly simple: grains of rice, doubling the amount in each square of the board.

Chess and the grain of rice

Riddle statement

On a board with 64 squares, grains of rice are placed in the following way: 1 grain in the first square, 2 in the second, 4 in the third, and so on, always doubling the amount.

How many grains of rice will there be in total on the board, adding the grains of the 64 squares?

Show solution

Solution

The quantities form a geometric progression:

$1,\ 2,\ 4,\ 8,\ \dots,\ 2^{63}.$

The sum of a geometric progression of ratio 2 with 64 terms is

$1 + 2 + 4 + \cdots + 2^{63} = 2^{64} - 1.$

Therefore, the total number of grains is

$2^{64} - 1 = 18\,446\,744\,073\,709\,551\,615.$