MathDB
Find number of squares and rectangles - [IMO LongList 1971]

Source:

January 1, 2011
geometryrectangleanalytic geometryvectorcombinatorics proposedcombinatorics

Problem Statement

The points S(i,j)S(i, j) with integer Cartesian coordinates 0<in,0<jm,mn0 < i \leq n, 0 < j \leq m, m \leq n, form a lattice. Find the number of:
(a) rectangles with vertices on the lattice and sides parallel to the coordinate axes;
(b) squares with vertices on the lattice and sides parallel to the coordinate axes;
(c) squares in total, with vertices on the lattice.