Problem

Source: TSTST 2024, problem 9

Tags: rectangle, combinatorics, USA TSTST, Tstst



Let $n \ge 2$ be a fixed integer. The cells of an $n \times n$ table are filled with the integers from $1$ to $n^2$ with each number appearing exactly once. Let $N$ be the number of unordered quadruples of cells on this board which form an axis-aligned rectangle, with the two smaller integers being on opposite vertices of this rectangle. Find the largest possible value of $N$. Anonymous