I was trying to approach an equation of the type:
$$ \alpha m + \beta = n^2 $$
where $\alpha$ and $\beta$ are given integer constants and $m$ and $n$ are integer to be found. Is there a standard way to approach equations like these? If so, can you share me a link or some useful material?
Thanks, Dave
Your equation of
$$\alpha m + \beta = n^2 \tag{1}\label{eq1A}$$
means that if $\alpha = 0$, there's a solution only if $\beta$ is a perfect square, with $n$ then being $\sqrt{\beta}$ and $m$ being any integer.
For $\alpha \neq 0$, one other restriction to consider is if there's any prime $p$ where the # of factors of it in $\beta$, call it $q$, is odd and the number of factors of $p$ in $\alpha$ is $\gt q$. In those cases, there are no solutions since $\alpha m + \beta$ would have the odd $r$ factors of $p$, but $n^2$ must have an even number of factors of $p$.
Apart from the restrictions mentioned above, note you have
$$\beta \equiv n^2 \pmod{\alpha} \tag{2}\label{eq2A}$$
i.e., $\beta$ must be a quadratic residue modulo $\alpha$. Any $n$ which satisfies \eqref{eq2A} will then have a corresponding $m$ from \eqref{eq1A} of $m = \frac{n^2 - \beta}{\alpha}$. As for finding an $n$, as suggested by Robert Israel's comment, the Complexity of finding square roots Wikipedia article section describes several algorithmic methods.
However, note if $\beta$ is not a quadratic residue modulo $\alpha$, then there are no solutions. For example, if $\alpha$ is a multiple of $3$ and $\beta \equiv 2 \pmod{3}$, there are no solutions since $2$ is not a quadratic residue modulo $3$, i.e., there's no $n$ such that $n^2 \equiv 2 \pmod{3}$.