IMO 2021 · Problem 1

Let \(n \ge 100\) be an integer. Ivan writes the numbers \(n, n + 1, \ldots, 2n\) each on different cards. He then shuffles these \(n + 1\) cards, and divides them into two piles. Prove that at least one of the piles contains two cards such that the sum of their numbers is a perfect square.

Official text of the problem. Official problem paper (PDF)

Solution

We will find three distinct numbers among \(n,n+1,\ldots,2n\) such that the sum of any two is a perfect square. Two of their cards must belong to the same pile, which will prove the result.

Let \(m\) be the largest positive integer satisfying \[ m(m+2)\le n. \] Since \(9\cdot11=99\le n\), we have \(m\ge9\). By maximality, \[ n<(m+1)(m+3). \] Moreover, \[ 2m(m-2)-(m+1)(m+3) =m^2-8m-3 =(m-9)(m+1)+6>0. \] Consequently, \[ n<2m(m-2). \]

Now consider the three integers \[ a=2m^2-4m,\qquad b=2m^2+1,\qquad c=2m^2+4m. \] As \(m\ge9\), they satisfy \[ n<a<b<c=2m(m+2)\le2n. \] Thus all three occur on distinct cards. Their pairwise sums are \[ a+b=(2m-1)^2,\qquad a+c=(2m)^2,\qquad b+c=(2m+1)^2. \] By the pigeonhole principle, at least two of these three cards lie in the same pile. Their numbers have a perfect-square sum, as required. \(\square\)

The solution was checked against the official IMO shortlist solutions.