257. Suspicious sum. Let $a$ and $b$ be integers. Can the sum $\frac{a}{b}+\frac{b}{a}$ be an integer?
257. We can assume without loss of generality that $a$ and $b$ are coprime and $a>0$. If $\frac{a}{b}+\frac{b}{a}=k$, an integer, then the equation $a^{2}+b^{2}=a b k$ would hold, which means $b^{2}=a(b k-a)$. This would imply that $b^{2}$ is divisible by $a$; but this is only possible if $a= \pm b$. Therefore, our sum is an integer if and only if $a= \pm b$.