Let $m,n$ be relatively prime positive integers. Prove that the numbers $$\frac{n^4+m}{m^2+n^2} \qquad \frac{n^4-m}{m^2-n^2}$$cannot be integer at the same time.
Problem
Source: 2023 Turkey Junior National Olympiad P3
Tags: number theory, Divisibility, relatively prime
22.12.2023 15:01
Suppose the contrary. Note that $n^2\equiv -m^2\pmod{m^2+n^2}$, so that $n^4+m\equiv n^2\cdot n^2+m\equiv -m^2n^2+m\pmod{m^2+n^2}$. So, $m^2+n^2\mid m(mn^2-1)$. As $(m,m^2+n^2)=1$, we thus obtain $m^2+n^2\mid mn^2-1$. Likewise, $m^2-n^2\mid mn^2-1$.Now, observe that $(m^2+n^2,m^2-n^2)\in\{1,2\}$. So, \[ m^4-n^4\mid 2(mn^2-1)\Rightarrow |m-n|\cdot (m+n)(m^2+n^2)\le 2mn^2-2. \]Simple inequalities show that in fact \[ (m+n)(m^2+n^2)+2>2mn^2, \]yielding a contradiction.
23.12.2023 02:05
My solution is same but in a longer way: Using the equality $n^4 + m = n^4 - m^4 + m^4 + m = (n^2-m^2)(n^2 + m^2) + m(m^3 + 1)$, we have $$m^2 + n^2 \mid n^4 + m \Rightarrow m^2 + n^2 \mid m(m^3 + 1) \qquad (1)$$Since no positive divisor of $m$ divides $m^2 + n^2$, $m$ and $m^2+n^2$ are coprime. From $(1)$, we obtain $$m^2 + n^2 \mid m^3 +1 \qquad (2)$$. Using the equality $n^4 - m = n^4 - m^4 + m^4 - m = (n^2-m^2)(n^2 + m^2) + m(m^3 - 1)$, we have $$m^2 - n^2 \mid n^4 - m \Rightarrow m^2 - n^2 \mid m(m^3 - 1) \qquad (3)$$. Since no positive divisor of $m$ divides $m^2 - n^2$, $m$ and $m^2 - n^2$ are coprime. From $(3)$, we obtain $$m^2 - n^2 \mid m^3 - 1 \qquad (4)$$. Similarly, since $m^3 - 1 = m(m^2 - n^2) + mn^2 - 1$, we have $m^2 - n^2 \mid mn^2 - 1$ and since $m^3 + 1 = m(m^2 + n^2) - mn^2 + 1 = m(m^2 + n^2) - (mn^2 - 1)$, we have $m^2 + n^2 \mid mn^2 - 1$. The greatest common divisor of $m^2 - n^2$ and $m^2 + n^2$ is $1$ or $2$. To see this, let's write $m^2 + n^2 = dk_1$ and $m^2 - n^2 = dk_2$ and solve the system: $2m^2 = d(k_1 + k_2)$ and $2n^2 = d(k_1 - k_2)$. If $d>2$, then $d \mid 2m^2$ and $d \mid 2n^2$, which contradicts the coprimality of $m$ and $n$. Since $m^2 + n^2 \mid mn^2 - 1$ and $m^2 - n^2 \mid mn^2 - 1$, if $\text{gcd} (m^2 + n^2, m^2 - n^2) = 1$, then $(m^2 + n^2)(|m^2 - n^2|) \mid (mn^2 - 1)$, and if $\text{gcd} (m^2 + n^2, m^2 - n^2) = 2$, then $(m^2 + n^2)(|m^2 - n^2|) \mid 2(mn^2 - 1)$. In either case, we have $|m^4 - n^4| \leq 2(mn^2 - 1)$. For $m > n$, we have $m^4 - (m-1)^4 \leq m^4 - n^4 \leq 2(mn^2 - 1) \leq 2(m^3 - 1)$. For $n > m$, we have $n^4 - (n-1)^4 \leq n^4 - m^4 \leq 2(mn^2 - 1) \leq 2(n^3 - 1)$. (Note that for $m^2 - n^2$ to be defined, $m^2 - n^2 \neq 0 \Longrightarrow m \neq n$, so the case $m=n$ is excluded.) Both inequalities are essentially the same. If we solve for $k = m$ or $k = n$, we get $$\begin{array}{rcl} k^4 - (k-1)^4 \leq 2k^3 - 2 &\Longrightarrow& 4k^3 - 6k^2 + 4k - 1 \leq 2k^3 -2 \\ &\Longrightarrow & 2k^3 < 2k^3 + 4k + 1 \leq 6k^2 \\ &\Longrightarrow & k < 3 \end{array}$$which implies that the larger of $m$ and $n$ must be less than $3$. Therefore, we only need to check the pairs $(m,n)=(2,1)$ or $(m,n) = (1,2)$. It can be easily seen that these do not satisfy the condition. Thus, in this case, the numbers cannot both be integers.
23.12.2023 03:18
combo incompetency Notice that \[m^2+n^2\mid n^4+m\implies m^2+n^2\mid mn^4+m^2\implies m^2+n^2\mid mn^4-n^2\implies m^2+n^2\mid mn^2-1\]\[m^2-n^2\mid n^4-m\implies m^2-n^2\mid mn^4-m^2\implies m^2-n^2\mid mn^4-n^2\implies m^2-n^2\mid mn^2-1\]now since \[\gcd{(m^2+n^2,m^2-n^2)}=\gcd{(m^2+n^2,2n^2)}\]we can note: if $m^2+n^2$ is odd then this is $1$, otherwise it's $2$. Importantly, \[k\cdot \text{lcm}(m^2+n^2,m^2-n^2)=|m^4-n^4|\]where $k\mid 2$ hence \[m^4-n^4\mid 2mn^2-2.\](Rip bad wording lmao) Anyway, if $n>m$ then clearly \[n^4-m^4\le 2mn^2-2\implies n^4-(n-1)^4\le 2(n-1)n^2-2\implies 4n^3-6n^2+4n-1\le 2n^3-2n^2-2\]\[2n^3-4n^2+4n+1\le 0\]\[2n^3-4n^2+4n<0\]\[n^2-2n+2<0\]\[(n-1)^2+1<0\]which obviously doesn't work. If $n=m$ then we're dividing by $0$ in the original problem, which doesn't work. If $n<m$ then \[m^4-(m-1)^4\le 2m(m-1)^2-2\implies 4m^3-6m^2+4m-1\le 2m^3-4m^2+2m-2\]\[2m^3-2m^2+2m+1\le 0\]\[2m^3-2m^2+2m<0\]\[m^2-m+1<0\]\[m(m-1)+1<0\]again we fail. Done.