6

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?

Bill Dubuque
  • 272,048
  • In such problems (about an equation and finding solutions), usually you have a strong condition, which you can convert it to some weaker condition, for which you are able to find solutions (somewhat similar to the idea of taking modulo some number in many NT problems ). – tarzanjunior Sep 15 '20 at 12:31
  • 1
    How do you deduce that $ab$ is rational? – kingW3 Sep 15 '20 at 12:47
  • 2
    The solution you quote is incorrect; if $b=-\tfrac1a$ you get two integers, for any choice of nonzero real number $a$. – Servaes Sep 15 '20 at 12:48
  • 2
    Contest math problems frequently make use of 'tricks' and I don't think this is any different – Amadeus Sep 15 '20 at 12:54
  • @kingW3 sorry, I only just saw your message, I have edited the question –  Sep 15 '20 at 13:38
  • You can either look at each term individually and try to progress or you can take the sum/difference/product/quotient, taking sum/difference/product preserves integerness, looking at the product it's easy to see it's a rational function of $ab$. – kingW3 Sep 15 '20 at 15:28
  • I changed it to be positive rationals to exclude the obvious solutions $, b = -1/a\ \ $ – Bill Dubuque Sep 15 '20 at 18:03
  • It's easier to use the Rational Root Test to show for $,x\in \Bbb Q,$ that $,x + 1/x \in \Bbb Z\iff x=\pm1\ \ $ – Bill Dubuque Sep 15 '20 at 18:06

2 Answers2

1

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$

Toni Mhax
  • 1,252
0

Let $m$ and $n$ be any integers such that either $mn\geqslant4$ or $mn<0$. Then $$a=\tfrac12[m\pm\surd(m^2-4m/n)]\quad\text{and}\quad b=\tfrac12[n\pm\surd(n^2-4n/m)]$$satisfy the condition that $a+1/b$ and $b+1/a$ are integers. This can readily be checked by substituting for $a$ and $b$, eliminating the surd in the denominator, and simplifying.

To show the necessity of the result, let $a+1/b=m$ and $b+1/a=n$. By adding and subtracting these equations, dividing the resulting equations to eliminate the common factor $1+1/ab$, and rearranging, it can easily be found that$$\frac ab=\frac mn.$$Substituting for $b$ (resp. $a$) from this result, we obtain a quadratic equation $na^2+m=mna$ for $a$ (and similarly for $b$) which yields the above solution via the quadratic formula.

If we add the requirement of the new, edited, question, then only solutions for which the surds are rational may be accepted. Thus, in addition, $m^2n^2-4mn$ must be a perfect square. It follows that there is such a square of the form $(mn-2)^2-4$. But the only squares that differ by $4$ are $0$ and $4$. Hence $mn-2=\pm2$, and therefore $mn=4$, since $mn\neq0$. This leaves the only possibilities for $a$ as $\pm\frac12$, $\pm1$, and $\pm2$, with the corresponding value for $b$ as the reciprocal of $a$.

John Bentin
  • 18,454