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)$??!!
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___