Find all pairs of positive rationals $(a, b)$ with $\frac{ab+1}{a}$, $\frac{ab+1}{b}$ both integers

contest-mathelementary-number-theoryintuitionproblem solvingproof-explanation

I was just trying to do the following question:

Find all pairs of real rational numbers $(a, b)$ such that the numbers $\frac{ab+1}{a}$, $\frac{ab+1}{b}$ are both integers.

I didn't even know how to start it. I thought of using number theory, however, that's about it. I then looked at the solution and it is as follows:

The numbers $a+\frac{1}{b}$ and $b+\frac{1}{a}$ are integers, hence we have that the number:

$(a+\frac{1}{b})(b+\frac{1}{a})=ab+\frac{1}{ab}+2$ is an integer. Hence we have that the number $ab+\frac{1}{ab}$ is an integer.

I state that $ab=\frac{k}{l}$ where $k$ and $l$ are integers and $(k, l)=1$. We want $\frac{k^2+l^2}{kl}\in Z$. Since $k|kl$ and $kl|k^2+l^2$, $k|l^2$ and since $(k, l)=1$, we have that $k=1$. Similarly we prove that $l=1$. Hence $ab=1$ and $2a$, $2b$ are integers hence the solutions are $(a, b)=(\frac{1}{2}, 2), (1, 1), (2, \frac{1}{2})$.

I have fully understood this solution, however I haven't managed to comprehend how to originally think of going down this path, how to intuitively realize that this is what I am supposed to do. Could you please explain to me how to intuitively think of it and also, if there exists a more intuitive solution-thought pattern could you please post it?

Best Answer

The idea is simple as we want to get a one variable equation to study which happens to be $P=ab$.

From $P+1/P-n=0$ we have the second degree polynomial $P^2-nP+1=0$. Now solving in $P=\dfrac{n\pm\sqrt{n^2-4}}{2}$

Getting back $ab=P$ and $\dfrac{P+1}{P/a}=c\in \mathbb{Z}$ and $\dfrac{P+1}{a}=d\in \mathbb{Z}$

$a=\dfrac{cP}{1+P}$ and $a=\dfrac{P+1}{d}$ so $$cdP=P^2+1+2P$$ since $P^2+1=nP$, taking $cd=n+2$ gives the solutions in $\mathbb{R}$

If you want solutions in $\mathbb{Q}$ then as it is said $n=\pm 2$ and $P=\pm 1$

Related Question