Two perfect squares are friends if one is obtained from the other adding the digit $1$ at the left. For instance, $1225 = 35^2$ and $225 = 15^2$ are friends. Prove that there are infinite pairs of odd perfect squares that are friends.
Problem
Source: Rio de Janeiro Mathematical Olympiad 2018, Level 3, #6
Tags: number theory
duck_master
17.11.2019 02:37
Suppose that $n^2$ and $m^2$ are friends and both odd, with the former being greater than the latter. Then $n$ and $m$ are both odd, and $n^2 - m^2$ is a power of ten.
Then, because of the difference-of-squares identity $n^2 - m^2 = (n-m)(n+m)$, this means that $n+m = 2^a 5^b$ for some $a, b$ and $n-m = 2^c 5^d$ for some $c, d$, where $a + c = b + d$.
Adding the two equations, we obtain $2n = 2^a 5^b + 2^c 5^d$. The right hand side has to be even, but not a multiple of 4. This means that $a$ and $c$ have to be both positive or zero. If they are both positive, they cannot be both at least two (since the right hand side would be a multiple of 4), but they cannot be both one (since $2^a 5^b + 2^c 5^d = 2(5^b + 5^d)$ would be a multiple of 4), so one of them has to be one and the other has to be at least two. If $a$ and $c$ are both zero, then $2^a 5^b + 2^c 5^d = 5^b + 5^d \equiv 1^b + 1^d \equiv 2\pmod{4}$, so all such cases work.
Similarly, subtracting the two equations, we obtain $2m = 2^a 5^b - 2^c 5^d$. The right hand side has to be even, but not a multiple of 4. This means that $a$ and $c$ have to be both positive or both zero. If they are both positive, they cannot be both at least two, and they cannot be both one, so one of them has to be one and the other has to be at least two. However, if $a$ and $c$ are both zero, then $2^a 5^b - 2^c 5^d = 5^b - 5^d \equiv 1^b - 1^d \equiv 0\pmod{4}$, so no such cases work.
In conclusion, we have demonstrated that $n^2$ and $m^2$ are friends and both odd iff $n+m = 2^a 5^b$ for some $a, b$ and $n-m = 2^c 5^d$ for some $c, d$, where $a + c = b + d$ and where $a = 1, c \geq 2$ or vice versa. This clearly covers infinitely many cases, so we are done.
pablock
18.11.2019 05:54
Cute problem.
Lemma: There exist infinitely many pairs $(m,n)$ of positive integers such that $5<\frac{5^{2m+1}}{2^{2n+1}}<6.$
Proof.It is equivalent to $4^{n+0.5}<25^m<4^{n+\log_4{2.4}}$ or $0.5<m \cdot \log_4{25}-n <\log_4{2.4}$ then we are done by Kronecker's Approximation Theorem.
Now, for these pairs, we have $14<\frac{5^{2m+1}}{2^{2n-1}}+\frac{2^{2n+1}}{5^{2m-1}}<50$. One can verify that this is equivalent to $4\cdot 10^{2n+1}< (2\cdot 5^{m+n+1}- 2^{2n+1}\cdot 5^{n-m+1})^2<4 \cdot 10^{2n+2}.$ Hence it's easy to show that $(5^{m+n+1}- 2^{2n}\cdot 5^{n-m+1})^2$ and $(5^{m+n+1}+2^{2n}\cdot 5^{n-m+1})^2$ are friends.