Find all integers $m$ and $n$ such that $\frac{m^2+n}{n^2-m}$ and $\frac{n^2+m}{m^2-n}$ are both integers.
Problem
Source: 2021 Pan-African Mathematics Olympiad, Problem 4
Tags: PAMO, number theory, Divisibility
24.05.2021 23:06
How did you get the PAMO 2021 problems, can you provide the link of the website and were do i can find problems pls . Also sorry for bumping this with no hints and solutions for the problem
25.05.2021 04:18
Routine casework. For $m=n$, we have $m^2-m\mid m^2+m$, that is $m-1\mid m+1\implies m-1\in 2$. We find $(m,n)=(-1,-1),(2,2)$, and $(3,3)$ as the solutions for this case. Likewise, if $m=-n$, then clearly any such pair works: $(-n,n)$ for $n\in\mathbb{Z}$, $n\ne 0$. Assume therefore that $m\ne n$, and let $|m|>|n|$ (the other case is identical). We have $m^2-n\mid n^2+m$. Now, if $m=-n^2$ then the first implication yields $n\mid n^3+1$, that is $n\in\{\pm 1\}$, whereas $|m|=|n|$ for this case. Hence $m+n^2\ne 0$. Now, it is evident that $m^2-n>0$ as $|m|>|n|$. If $n^2+m<0$, then we have $m^2-n\le -m-n^2$, that is $m^2+m+n^2-n\le 0$. This is possible iff $m^2+m=0$ and $n^2-n=0$, that is only when $(m,n)=(-1,0)$. The meat. In the remainder, we safely assume $n^2+m>0$. Thus, $0<m^2-n\le n^2+m$< yielding $m^2-n^2 \le m+n$. As $|m|>|n|$, we then conclude $m^2-n^2>0$, which in turn implies $m+n>0$. Moreover, $m^2-n^2=(m-n)(m+n)>0$, forces $m-n>0$. Finally, dividing $m+n$, we also have $m-n\le 1$. Consequently, $m=n+1$ is the only possible case. In particular, $m,n>0$. Inspecting this, we are left with $n^2-n-1\mid n^2+3n+1$, that is $n^2-n-1\mid 2n(n+1)$. Since $n^2-n-1$ is an odd integer coprime to $n$, we then obtain $n^2-n-1\mid n+1$. Clearly $(m,n)=(2,1),(3,2)$ works, hence assume $n\ge 3$. Notice, however that $n^2-n-1\mid n+1\implies (n-1)^2 \le 3\implies n-1<2$, that is $n<3$. A contradiction is reached.
25.05.2021 14:02
$m^2-n|n^2+m \implies m^2-n|n^4-n$. Note that $n^4-n\ge 0$. Thus we have $m^2-n\le n^4-n \implies (n^2-m)(n^2+m)\ge 0...(1) $ and . $(m^2-n)(m^2+n)\ge 0...(2)$ At least one of $(n^2-m),(n^2+m)$ and one of $(m^2-n),(m^2+n)$ is non-negative $\implies (n^2-m),(n^2+m),(m^2-n),(m^2+n)$ are all non-negative. This show denominators must be less than or equal to numerators. Therefore $0\le (m+n)(m-n+1)$ and $0\le (m+n)(n-m+1)$. We have $$(m+n)^2(n-m+1)(m-n+1)\ge 0$$ $i)$ $m+n=0 \implies m=-n, m\neq 0 $ which is a solution. $ii)$ $m+n\neq 0 \implies m\in \{ n-1,n,n+1\}$. After boring casework $(m=n-1,n,n+1)$ we have: $$(m,n)\in\{(m,-m),(-1,0),(0,1),(1,2),(2,3),(0,-1),(1,0),(2,1),(3,2),(-1,-1),(0,0),(2,2),(3,3)\}$$
29.05.2021 00:31
This problem is some sense the same problem as A109 from Problems in Elementary Number Theory: https://artofproblemsolving.com/community/c146h150477p849366. The only difference is that in the PEN problem, we are only asked for the solutions where $m$ and $n$ are positive. Of course this restriction does change the flavour of the problem.
29.05.2021 00:55
SerdarBozdag wrote: $m^2-n|n^2+m \implies m^2-n|n^4-n$. Note that $n^4-n\ge 0$. Thus we have $m^2-n\le n^4-n \implies (n^2-m)(n^2+m)\ge 0...(1) $ and . $(m^2-n)(m^2+n)\ge 0...(2)$ $i) m,n \ge 0$: $ii) m\ge 0, n<0$ $iii) m <0, n \ge 0$ $iv) m<0, n<0$ $i)$ From $(1)$ and $(2)$ we have $n^2-m \ge 0$ and $m^2-n \ge 0$. We obviously have $n^2+m \ge 0$ and $m^2+n \ge 0$. Therefore $n^2-m \le m^2+n$ and $m^2-n \le n^2+m \implies n-1 \le m \le n+1$. Observe that all other cases give the same inequalities using $(1)$ and $(2)$. After boring casework $(m=n-1,n,n+1)$ we have: $$(m,n)\in\{(-1,0),(0,1),(1,2),(2,3),(0,-1),(1,0),(2,1),(3,2),(-1,-1),(0,0),(2,2),(3,3)\}$$ The marking scheme being what it is, this would only have been awarded 2 points. edit: Actually, possibly only 1/7.
29.05.2021 00:57
MathLuis wrote: How did you get the PAMO 2021 problems, can you provide the link of the website and were do i can find problems pls . Also sorry for bumping this with no hints and solutions for the problem I assume that they were one of the contestants, team leaders, or a member of the problems committee or the local organising committee. (Probably one of the students.) The problems are not available on the official website yet, as far as I can tell. The official 2021 website is https://www.pamo2021.cf/ In general, there are past problems available on http://africamathunion.org/AMU-pamo-official.php
29.05.2021 12:58
DylanN wrote: SerdarBozdag wrote: $m^2-n|n^2+m \implies m^2-n|n^4-n$. Note that $n^4-n\ge 0$. Thus we have $m^2-n\le n^4-n \implies (n^2-m)(n^2+m)\ge 0...(1) $ and . $(m^2-n)(m^2+n)\ge 0...(2)$ $i) m,n \ge 0$: $ii) m\ge 0, n<0$ $iii) m <0, n \ge 0$ $iv) m<0, n<0$ $i)$ From $(1)$ and $(2)$ we have $n^2-m \ge 0$ and $m^2-n \ge 0$. We obviously have $n^2+m \ge 0$ and $m^2+n \ge 0$. Therefore $n^2-m \le m^2+n$ and $m^2-n \le n^2+m \implies n-1 \le m \le n+1$. Observe that all other cases give the same inequalities using $(1)$ and $(2)$. After boring casework $(m=n-1,n,n+1)$ we have: $$(m,n)\in\{(-1,0),(0,1),(1,2),(2,3),(0,-1),(1,0),(2,1),(3,2),(-1,-1),(0,0),(2,2),(3,3)\}$$ The marking scheme being what it is, this would only have been awarded 2 points. edit: Actually, possibly only 1/7. I am aware of the fact that I must write the cases. Because I am slow at latex I did not want to write the whole solution.
29.05.2021 13:09
anyone__42 wrote: Find all integers $m$ and $n$ such that $\frac{m^2+n}{n^2-m}$ and $\frac{n^2+m}{m^2-n}$ are both integers. APMO-2002
29.05.2021 14:01
SerdarBozdag wrote: DylanN wrote: SerdarBozdag wrote: $m^2-n|n^2+m \implies m^2-n|n^4-n$. Note that $n^4-n\ge 0$. Thus we have $m^2-n\le n^4-n \implies (n^2-m)(n^2+m)\ge 0...(1) $ and . $(m^2-n)(m^2+n)\ge 0...(2)$ $i) m,n \ge 0$: $ii) m\ge 0, n<0$ $iii) m <0, n \ge 0$ $iv) m<0, n<0$ $i)$ From $(1)$ and $(2)$ we have $n^2-m \ge 0$ and $m^2-n \ge 0$. We obviously have $n^2+m \ge 0$ and $m^2+n \ge 0$. Therefore $n^2-m \le m^2+n$ and $m^2-n \le n^2+m \implies n-1 \le m \le n+1$. Observe that all other cases give the same inequalities using $(1)$ and $(2)$. After boring casework $(m=n-1,n,n+1)$ we have: $$(m,n)\in\{(-1,0),(0,1),(1,2),(2,3),(0,-1),(1,0),(2,1),(3,2),(-1,-1),(0,0),(2,2),(3,3)\}$$ The marking scheme being what it is, this would only have been awarded 2 points. edit: Actually, possibly only 1/7. I am aware of the fact that I must write the cases. Because I am slow at latex I did not want to write the whole solution. That's not the problem in this case. The problem is that you didn't include the $(-m, m)$ solution. Because of the way the marking scheme was designed (most leaders did not have input this year because they were participating virtually) the maximum possible score in this case would have been 2/7, even if it was a small error that led to the student not discovering those solutions. I'm not sure if you did the other cases and just didn't want to write them, but the fact that there is an infinite family of solutions that you missed means that the $m < 0$, $n \geq 0$ case is not exactly the same as the others.
29.05.2021 16:00
@above fixed it.
09.05.2023 15:48
SerdarBozdag wrote: ... After boring casework $(m=n-1,n,n+1)$ we have: $$(m,n)\in\{(m,-m),(-1,0),(0,1),(1,2),(2,3),(0,-1),(1,0),(2,1),(3,2),(-1,-1),(0,0),(2,2),(3,3)\}$$ $(0, 0)$ isn't a solution though.