*** Welcome to piglix ***

Wheat and Chessboard Problem


The wheat and chessboard problem (sometimes expressed in terms of rice grains) is a mathematical problem expressed in textual form as:

If a chessboard were to have wheat placed upon each square such that one grain were placed on the first square, two on the second, four on the third, and so on (doubling the number of grains on each subsequent square), how many grains of wheat would be on the chessboard at the finish?

The problem may be solved using simple addition. With 64 squares on a chessboard, if the number of grains doubles on successive squares, then the sum of grains on all 64 squares is: 1 + 2 + 4 + 8 + ... and so forth for the 64 squares. The total number of grains equals 18,446,744,073,709,551,615 (the 64th Mersenne number), much higher than what most intuitively expect.

The exercise of working through this problem may be used to explain and demonstrate exponents and the quick growth of exponential and geometric sequences. It can also be used to illustrate sigma notation. When expressed as exponents, the geometric series is: 20 + 21 + 22  + 23 + ... and so forth, up to 263. The base of each exponentiation, "2", expresses the doubling at each square, while the exponents represent the position of each square (0 for the first square, 1 for the second, etc.).

The simple, brute-force solution is to just manually double and add each step of the series:

The series may be expressed using exponents:

and, represented with capital-sigma notation as:

It can also be solved much more easily using:

A proof of which is:

Multiply each side by 2:

Subtract original series from each side:

The solution above is a particular case of the sum of a geometric series, given by

where is the first term of the series, is the common ratio and is the number of terms.


...
Wikipedia

...