Determine all positive integers $n$ such that $\frac{a^2+n^2}{b^2-n^2}$ is a positive integer for some $a,b\in \mathbb{N}$. $Turkey$
Problem
Source: Balkan MO Shortlist 2020 N1
Tags: number theory
14.09.2021 20:44
Let $n$ be odd. If $b$ is even then there is a $p \equiv 3 \pmod{4}$ such that $p|b^2-n^2$. We will have $p|a^2+n^2 \Rightarrow p|a, p|n \Rightarrow p|b$. If we divide everything by $p$ it will be the same situation and we cannot do this forever because no positive integer can have infinite primes in it. Contradiction. If $b$ is odd then we will have $4|a^2+n^2$ which is again impossible. Harder part is to find example for even $n$. Thinking about $b^2-a^2=2n^2$ gives an example.
15.09.2021 12:44
If $n$'s odd case is done @above. Constraction for $n=2k$ : Choose $b=(2k^2+1)^2$ and $a=(2k^2-1)^2$ $\implies$ $a^2+n^2=b^2-n^2$.
07.01.2022 17:46
For a construction it makes sense to try $b^2 - n^2 = a^2 + n^2 \Leftrightarrow (b-a)(b+a) = 2n^2$. The latter has a solution precisely when $2n^2$ is a product of two integers with the sum parity - which is only when $n$ is even. Explicitly, $b-a = 2$ and $b+a = n^2$, i.e. $b = \frac{n^2}{2} + 1$ and $a = \frac{n^2}{2} - 1$ works. Now let $n$ be odd. We want $b^2 - n^2$ to divide $a^2 + n^2$. If $a,b,n$ have a common divisor, then after dividing all of them by it we would get GCD$(a,b,n) = 1$ and the problem condition will not change. Now if $b$ is odd, then $b^2 \equiv n^2 \equiv 1 \pmod 4$ and so $a^2 + 1 \equiv 0 \pmod 4$, impossible. So $b$ is even and $b^2 - n^2 \equiv 3 \pmod 4$. Hence if $p\equiv 3 \pmod 4$ is a prime factor of $(b-n)(b+n) = b^2 - n^2 \geq 3$, then $p \mid b\pm n$ and $p \mid a^2 + n^2$, i.e. $p$ дели $b\pm n$ and $p \mid a$ and $p \mid n$, contradicting GCD$(a,b,n) = 1$.
15.03.2022 10:42
If $n$ is even, just choose $(a,b)=(n/2,3n/2)$. We wish to show that any odd $n$ doesn't work. To do this, we consider the following cases: Case1: $b$ is odd. We have $4|b^2-n^2$ but $4\nmid a^2+n^2$, which leads to a contradiction. Case2: $b$ is even. Suppose that the pair $(a,b)$ exists. Let $a_1,b_1,n_1$ be integers that $\frac{a}{a_1}=\frac{b}{b_1}=\frac{n}{n_1}=gcd(a,b,n)\implies gcd(a,b,n)=1$ By Fermat's sum of two squares theorem, we have a prime $p$ which $4|p-3$ and $p|a,p|b,p|n$. which leads to a contradiction Hence $n$ is any even positive integers.
07.10.2023 10:34
$n$ even clearly works with $(a,b)=(\frac{n}{2},\frac{3n}{2})$. WLOG assume $gcd(n,a,b)=1$. Now if $n$ is odd, for all primes $p|b^2-n^2$, they must be $1 \mod{4}$ or 2. Furthermore, $4$ cannot divide $b^2-n^2$. Hence $b$ is even. Then one of $b-n,b+n$ must be $3\mod{4}$ so it must have at least one prime factor $3 \mod{4}$, and hence there are no solutions.
11.04.2024 21:42
Solved with ubermensch. Say $(a, b, n) = d \implies \frac{a^2 + n^2}{b^2 - n^2} = \frac{d^2({a_0}^2 + {n_0}^2)}{d^2({b_0}^2 - {n_0}^2)} = \frac{{a_0}^2 + {n_0}^2}{{b_0}^2 - {n_0}^2}$ where $(a_0, b_0, n_0) = 1$. If $n_0$ is even, taking $a_0 = \frac{n^2}{2} - 1$, $b_0 = \frac{n^2}{2} + 1$ gives ${a_0}^2 + {n_0}^2 = {b_0}^2 - {n_0}^2$, so we're done for $n_0$ even. If $n_0, b_0 \equiv 1\mod{2}$, we have $4 \mid {b_0}^2 - {n_0}^2 \implies {a_0}^2 + {n_0}^2 \equiv 0\mod{4} \implies {a_0}^2 \equiv 3\mod{4}$, clearly impossible. This leaves when $b_0$ is even, which implies ${b_0}^2 - {n_0}^2 \equiv 3\mod{4}$, so there exists a prime $p$ such that $p \mid {b_0}^2 - {n_0}^2$ and $p \equiv 3\mod{4}$, which means $p \mid {a_0}^2 + {n_0}^2$. SFTSOC, $(a_0, p) = 1$, which means there exists $m$ such that $ma_0 \equiv 1\mod{p}$. We have $p \mid m^2({a_0}^2 + {n_0}^2) \implies p \mid (ma_0)^2 + (mn_0)^2$, which gives $(mn_0)^2 \equiv 1\mod{p}$, however $(mn_0)^2 \equiv (-1)^{\frac{p - 1}{2}} \mod{p}$, and since $p \equiv 3\mod{4}$, $(-1)^{\frac{p - 1}{2}} \equiv -1\mod{p}$, hence this is impossible. Therefore, we have $p \mid a_0 \implies p \mid b_0, p \mid n_0$, a contradiction as $(a_0, b_0, n_0) = 1$.
25.09.2024 20:26
Let $n$ be a solution to this problem. Suppose that $n$ is odd : then, since $a^2 + n^2 \equiv 1, 2$ $\pmod 4$, $v_2(a^2 + n^2) \leq 1$ so necessarily $v_2(b^2 - n^2) = 0, 1$. If $b^2 - n^2$ is even then $b \equiv 1[2]$ so $b^2 - n^2 \equiv 1[4]$. This would give $v_2(b^2 - n^2) \geq 2$, which is impossible. So $b^2 - n^2$ is odd : let's consider a prime $p \mid b^2 - n^2$. Since $0 \equiv a^2 + n^2 \equiv a^2 + 1 \pmod p$ and $p$ is odd, $p \equiv 1[4]$. Combining all such primes $p$, we have $b^2 - n^2 \equiv 1[4]$ which is impossible $\pmod 4$. Showing that $n$ even are solutions isn't hard : $(a, b) = (\frac{n}{2}, \frac{3n}{2})$ works giving an integer value of $1$.