The real numbers a and b satisfy |a| < 1 and |b| < 1.
(a) In a grid that extends infinitely, the first row contains the numbers 1, a, a^2, \dots. The second row contains the numbers b, ab, a^2 b, \dots. In general, each number is multiplied by a to give the number to the right of it, and each number is multiplied by b to give the number below it. Find the sum of all numbers in the grid.
(b) Now suppose the grid is colored like a chessboard, with alternating black and white squares, as shown below. Find the sum of all the numbers that lie on the black squares.
(a) The sum of the numbers in the first row is 1/(1 - a).
The sum of the numbers in the second row is ab/(1 - a).
The sum of the numbers in the third row is (a^2 b^2)/(1 - a).
So, the sum of the numbers in the rows form a geometric sequence, which adds up to
1/(1 - a) + ab/(1 - a) + (a^2 b^2)/(1 - a) + ... = 1/((1 - a)(1 - ab)).
(b) Since the colors of the chessboard alternate white and black, the sum of the numbers on the black squares is equal to the sum of the numbers on the white squares, except for the numbers that are on every other white square, and every other black square.
The sum of the numbers that are on every other white square is a/((1 - a)(1 - ab)), and the sum of the numbers that are on every other black square is b/((1 - a)(1 - ab)), so to find the sum of the numbers on the black squares, we take half the difference, which gives us a sum of
1/((1 - a)(1 - ab)) + 1/2*a/((1 - a)(1 - ab)) + 1/2*b((1 - a)(1 - ab)) = (a + b + 2)/(2(1 - a)(1 - ab)).