The total number of squares on the board is equal to the number of 1x1 squares (64) + the number of 2x2 squares + .... + number of 8x8 squares (1).
In general, the number of NxN squares on an 8x8 board can be obtained by figuring out the number possible positions for the upper-left corner of the smaller square. For example, if dealing with 7x7 squares, there are only 4 possible positions for its upper-left corner, and therefore, there are only 4 possible 7x7 squares on an 8x8 board.
A formula for this function F(N) is pretty easy to deduce: F(N) = (9-N)2
So, the overall sum is
F(1) + F(2) + F(3) + F(4) + F(5) + F(6) + F(7) + F(8) =
64 + 49 + 36 + 25 + 16 + 9 + 4 + 1 =
204 |