Problem

Source: Polish Junior Olympiad 2021 Final Round Problem 1, https://omj.edu.pl

Tags: positive integers, square roots, algebra



Positive integers $a$, $b$ an $n$ satisfy \[ \frac{a}{b}=\frac{a^2+n^2}{b^2+n^2}. \]Prove that $\sqrt{ab}$ is an integer.