Browse · MathNet
PrintIV OBM
Brazil counting and probability
Problem
is a array of lattice points. How many squares have their vertices in ?

Solution
The key is to consider how many squares have their vertices on the perimeter of a given array whose sides are parallel to the sides of the array.
The diagram shows that there are such squares. There are such arrays. So the total number of squares is .
The diagram shows that there are such squares. There are such arrays. So the total number of squares is .
Final answer
k(k+1)^2(k+2)/12
Techniques
Counting two waysEnumeration with symmetry