Problem

Source: Polish Math Olympiad 2021 2nd round p3 day 1

Tags: number theory, Sum of Squares



Positive integers $a,b,z$ satisfy the equation $ab=z^2+1$. Prove that there exist positive integers $x,y$ such that $$\frac{a}{b}=\frac{x^2+1}{y^2+1}$$