Upper bound for $\gcd(a,b)$ if $\frac{a+1}{b}+\frac{b+1}{a}\in\Bbb{N}$

228 Views Asked by At

Suppose that $a,b$ are two positive integers so that $\frac{a+1}{b}+\frac{b+1}{a}$ is also a positive integer.Find the best upper bound for $\gcd(a,b)$.

My work:
$\frac{a+1}{b}+\frac{b+1}{a}=\frac{a(a+1)+b(b+1)}{ab} \in \Bbb{N} \implies ab|a^2+b^2+a+b , 2ab \implies ab|(a+b)(a+b+1)\implies ab|a+b\ or\ ab|a+b+1$
Now may I infer that $a=b=1\ or\ a=b=2$? If yes how may we set an upper bound for $\gcd(a,b)$??!!

2

There are 2 best solutions below

0
On

For the equation. $$\frac{m+1}{n}+\frac{n+1}{m}=a$$

If are solutions of the equation Pell. $p^2-(a^2-4)s^2=1$

Then the formula is:

$$n=2(p-(a+2)s)s$$

$$m=-2(p+(a+2)s)s$$

And another solution:

$$n=\frac{2p(p+(a-2)s)}{a-2}$$

$$m=\frac{2p(p-(a-2)s)}{a-2}$$

If are solutions of the equation Pell. $p^2-(a^2-4)s^2=4$

Then the formula is:

$$n=\frac{p-(a-2)s+2}{2(a-2)}$$

$$m=\frac{p+(a-2)s+2}{2(a-2)}$$

You can write a more General formula. http://www.artofproblemsolving.com/community/c3046h1046841___

0
On

Fortunately with the help of one of my friends I got to the right answer as follows:
Assuming $d=\gcd(a,b),a=a'd,b=b'd$ we have: $$\frac{a+1}{b}+\frac{b+1}{a}=\frac{a'^2d+b'^2d+a'+b'}{a'b'd}$$ Now it's required that $d|a'+b'$ so that the expression is an integer , then:
$$d^2|a'd+b'd\implies d^2|a+b \implies d^2\leqslant a+b \implies \color{red}{d\leqslant \sqrt{a+b}}$$
Tha's all.