Let $x, y$ be two positive integers, with $x> y$, such that $2n = x + y$, where n is a number two-digit integer. If $\sqrt{xy}$ is an integer with the digits of $n$ but in reverse order, determine the value of $x - y$
Problem
Source: OLCOMA Costa Rica National Olympiad, Final Round, 2019 3.3
Tags: number theory, Digits
23.09.2021 02:48
According to the given information there is a two digit number $n=\overline{ab}$ and two positive integers $x>y$ s.t. $(1) \;\; x + y = 2n$, $(2) \;\; \sqrt{xy} = \overline{ba}$. The fact that $\sqrt{xy}$ is an integer implies there is a positive squarefree integer $d$ and two integers $u>v$ s.t. $(3) \;\; (x,y) = (du^2,dv^2)$. Combining (3) with (1) and (3) with (2), we obtain $(4) \;\; d(u^2 + v^2) = 20a + 2b$ and $(5) \;\; duv = 10b + a$ respectively. Consequently by (4) and (5) $d(u^2 + v^2) \pm 2duv = (20a + 2b) \pm (20b + 2a)$, i.e. $(6) \;\; d(u - v)^2 = 18(a - b)$, $(7) \;\; d(u + v)^2 = 22(a + b)$. If $11 \mid d$, then $11 \mid a - b$ by (6), which is impossible since $0 < a-b < 10$. This contradiction implies $11 \nmid d$, which according to (7) means $11 \mid u + v$. Hence $11 \mid a + b$ by (6), yielding $a + b = 11$ (since $1 \leq a + b \leq 18$), which according to (7) give us $d(u + v) = 2 \cdot 11^2$. Therefore (since $11 \mid u+v$) we obtain $d=2$ and $u+v=11$. Consequently by (6) $u - v = 3\sqrt{a - b}$, yielding (since $a + b = 11$) $(8) \;\; u - v = 3\sqrt{11 - 2b}$. Clearly $11 - 2b$ is an odd perfect square, i.e. $11 - 2b \in \{1,9\}$, which means $b \in \{1,5\}$. If $b=1$, then $a = 11 - 1 = 10$, contradicting $a \leq 9$. Hence $b=5$ and $a = 11 - b = 11 - 5 = 6$, which give us $u - v = 3$ by (8). This combined with $u + v = 11$ yields $(u,v) =(7,4)$. Summa summarum, $n = \overline{ab} = 65$ and $(x,y) = (du^2,dv^2) = (2 \cdot 7^2,2 \cdot 4^2) = (98,32)$, yielding $x - y = 98 - 32 = 66$.