For the equation
$f(x,y) = x^2/y$
given that $x$ and $y$ are integers
What is the easiest/fastest way to find at least one tuple $(x_0,y_0)$ solution to $f(x,y)=4$ or any other number really. I know that $(2,1)$ would work, but is there a process for finding the solution to any integer that is equal to $f(x,y)$?
Is there any easy way to just enter this in and calculate it in Mathematica, MATLAB, Sage, etc.? Is there any way to work this out by hand besides just guessing which values would work?
This could help: $x^2/y=a$, where $x,y,a$ are integers. If $a$ is a perfect square, $y=1$ and $x=\sqrt{a}$. If it isn't a perfect square, suppose $a=p_1^{\alpha_1}...p_k^{\alpha_k}$. Then any $y$ of the form $p_1^{\beta_1}...p_k^{\beta_k}$ such that $\alpha_i +\beta_i$ is even will do, because then $ay$ will be a perfect square. Moreover, $ay$ times any other perfect square is good too.