Tagged: geometry
This is equivalent to finding the number of squares that can be formed from an n x n chessboard which is (n)(n+1)(2n+1)/6