You can form (n-1)2 2 by 2 squares.
You can form (n-2)2 3 by 3 squares.
You can form (n-3)2 4 by 4 squares.
. . . You can form 12 n by n square.
The sum of all these sums is n*(n+1)*(2n+1)/6
Thanks to Guy de Kindler for this one.
Michael Shackleford, A.S.A.