Treebeard's Stumper Answer

Chess Squares (continued)
The Gory Details!
"With some algebra" was an understatement. Here are the details.In general, the number of squares on a nbym chessboard, with n >= m, is given by the m terms of the series:
sum = (m)(n) + (m1)(n1) + (m2)(n2) + ... + (1)(nm+1)Consider the individual terms, arranged to show the pattern:(m) (n) = mn (m1)(n1) = mn  (n + m) + 1 (m2)(n2) = mn  2(n + m) + 4 (m3)(n3) = mn  3(n + m) + 9 . . .Adding the first m terms of this series vertically gives:sum = m(mn)  [1+2+3+...+(m1)](n+m) + [1+4+9+...+(m1)(m1)]The sum of the first m integers is m(m+1)/2, and the sum of the first m squares is m(m+1)(2m+1)/6, but we only need the first m1 sums. So this becomes:(m1)(m) (m1)(m)(2m1) sum = m(mn)   (n+m) +  2 6Now it's just a matter of expanding and collecting terms with basic algebra. Note that I'm writing m^{2}n as mmn to simplify the HTML code for this page.3(m1)(m)(n+m)  (m1)(m)(2m1) sum = mmn   6 (m)(m1) [3(n+m)(2m1)] = mmn   6 6mmn  (m)(m1)(m+3n+1) =  6 6mmn  mmm  3mmn + 3mn + m =  6 3mmn  mmm + 3mn + m =  6 m (3mn  mm + 3n + 1) =  6 m (m+1) (3nm+1) =  6And there's the final form:sum = m(m+1)(3nm+1)/6Heck of a way to spend a Saturday morning, but I'm not complaining. This was fun!
Back to Stumper Answer
Last modified .