27 Mar 2026

Alyssa, Bilal, Constantine, and Daiyu each live in a house that is numbered with a positive integer.
A four-digit perfect square is formed by writing Alyssa's house number followed by Bilal's house number. Another four-digit perfect square is formed by writing Constantine's house number followed Daiyu's house number. Constantine's house number is $31$ more than Alyssa's house number, and Daiyu's house number is $31$ more than Bilal's house number. What is each person's house number?

Proposed as the problem of the week #24 of year 2025/26, by the Centre for Education in Mathematics and Computing of the University of Waterloo.

Let $a, b, c, d \in \mathbf N$ be the house numbers of Alyssa, Bilal, Constantine, and Daiyu, respectively. By the statement $$ \begin{cases} c &= a + 31,\\ d &= b + 31; \end{cases} $$ hence, they must all be two-digit numbers, since $c$ and $d$ have at least two digits.
From this we now impose that their concatenations give perfect squares: $$ \begin{cases} m^2 &= 100 a + b,\\ n^2 &= 100 c + d, \end{cases} \implies n^2 = 100(a + 31) + (b + 31) = m^2 + 31\cdot 101, $$ where rearranging the terms and factoring the difference of squares yields $$ n^2 - m^2 = (n+m)(n-m) = 101\cdot 31. $$ These kinds of problems are usually set up so that the resulting factors are either prime or the number of cases to check are minimal; this is one of the first category, and thus follows that $$ \begin{cases} n + m &= 101,\\ n - m &= 31 \end{cases} \implies \begin{cases} m &= 35,\\ n &= 66. \end{cases} $$
Finally, because $35^2 = 1225$ and $66^2 = 4356$, the numbers we seek are $$ a = 12, \qquad b = 25, \qquad c = 43, \qquad d = 56. $$