Mathwords logoMathwords

Wheat and Chessboard Problem — Definition, Formula & Example

The Wheat and Chessboard Problem is a classic puzzle in which you place 1 grain of wheat on the first square of a chessboard, 2 on the second, 4 on the third, and keep doubling across all 64 squares. The total is so large that it shows how fast repeated doubling grows.

The problem asks for the sum of the finite geometric series with first term a=1a = 1, common ratio r=2r = 2, and n=64n = 64 terms: ∑k=1642k−1=264−1\sum_{k=1}^{64} 2^{k-1} = 2^{64} - 1. Square kk holds 2k−12^{k-1} grains. The problem is also called Rice on a Chessboard.

Key Formula

Sn=∑k=1n2k−1=2n−12−1=2n−1S_n = \sum_{k=1}^{n} 2^{k-1} = \frac{2^n - 1}{2 - 1} = 2^n - 1
Where:
  • SnS_n = Total number of grains on the first n squares
  • nn = Number of squares filled (64 for a full board)
  • kk = Square number, counting from 1
  • 2k−12^{k-1} = Grains on square k, since the amount doubles from one square to the next

Worked Example

Problem: Using the doubling rule, find (a) the total number of grains on the first row of 8 squares, (b) the number of grains on square 64 alone, and (c) the total number of grains on the whole board.
Step 1: The first row is a geometric series with a=1a = 1, r=2r = 2, and n=8n = 8. Apply the sum formula.
S8=28−1=255S_8 = 2^8 - 1 = 255
Step 2: Square kk holds 2k−12^{k-1} grains, so square 64 holds 2632^{63}.
263=9,223,372,036,854,775,8082^{63} = 9{,}223{,}372{,}036{,}854{,}775{,}808
Step 3: For the whole board, use n=64n = 64. Notice that the total equals twice the last square minus 1.
S64=264−1=2⋅263−1=18,446,744,073,709,551,615S_{64} = 2^{64} - 1 = 2 \cdot 2^{63} - 1 = 18{,}446{,}744{,}073{,}709{,}551{,}615
Answer: (a) 255 grains. (b) 9,223,372,036,854,775,808 grains. (c) 18,446,744,073,709,551,615 grains in total. The last square alone holds more grains than all 63 earlier squares combined.

Why It Matters

In Algebra 2 and precalculus, this problem is a classic introduction to exponential growth and finite geometric series. It also shows up in computer science. The largest number a 64-bit unsigned integer can store is exactly 264−12^{64} - 1, which equals the chessboard total.

Common Mistakes

Mistake: Saying square 64 holds 2642^{64} grains.
Correction: Square 1 holds 20=12^0 = 1 grain, so the exponent is always one less than the square number. Square 64 holds 2632^{63}. The quantity 264−12^{64} - 1 is the total for the whole board, not the count on the last square.

Related Terms