Solution of Diophantine equation $1+rn=l^2$ How can I find all the solutions of equation in $n$ and $l$, $$1+rn=l^2$$ where $n$ is non-square-free integer and $r,l$ are rationals with $r$ fixed.
Th question basically asks for what values of non-square-free integer $n$, $1+rn$ is the perfect square for given rational $r$.
For example, for $r=4,n=2,l=3$ is one of the solutions. I also know that this equation has infinite number of solutions for given $r$.
Note: If the above problem is difficult, you can also consider $r$ as a variable so that we seek the solution $(r,n,l)$.

Let $r=\frac{r_1}{r_2}$ with coprime $r_1$ and $r_2$. Then $1+rn=l^2$ is equivalent to $r_2+r_1n=r_2l^2$ in integers, or
$$
r_1n=r_2(l+1)(l-1).
$$
We can solve this equation in integers. First, since $r_2\mid r_1n$ and $gcd(r_1,r_2)=1$ we obtain $r_2\mid n$. So we can write $n=kr_2$, and we obtain
$$
r_1k=(l+1)(l-1).
$$
