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)$.
 A: 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).
$$
A: Above equation shown below has parametric solution:
$1+rn=l^2$
$r=2w(2k-1)$
$n=2w(k-2)$
$l=3w(k-1)$
Where,  $w=[1/(k+1)]$
For $k=7$ we get,
$(r,n,l)=[(13/4),(5/4),(9/4)]$
A: Above equation shown below:
$1+rn=l^2$  ---------(A)
We have the identity given below,
$[1+p*(p+2)]=(p+1)^2$
Hence taking $(r,n,l)=[(p),(p+2),(p+1)]$
we get the general solution & all solution's to equation (A)
For $p=11$, we get   $(r,n,l)=(11,13,12)$
A: The first version of the problem asks for integer solutions $n,\ell$ of the equation:
$$ 1 + rn = \ell^2 $$
where $r$ is a fixed rational number.  Dietrich Burde has done the biggest part of solving this version by showing it reduces to an identical form with an integer $r_1$ replacing the rational $r$.  However before we revisit that, let's fill in some details regarding all integer solutions, including non-positive integers $n,\ell$.
First the cases where zeros allowed are fairly easy.  To get $\ell = 0$ one needs $rn = -1$, so that $r$ would have to take the form $-1/n$ for some nonzero integer  $n$.  To get $n=0$ we need $\ell = \pm 1$, and $r$ can be any rational number.
The cases where negative integers are allowed are also easy.  Obviously when $\ell$ occurs in a solution, we can replace it with $-\ell$.  Henceforth we will consider only $\ell \ge 0$ for convenience.  The other point to make is that when $n$ is replaced by $-n$, one also needs to replace $r$ with $-r$ (unless $n$ or $r$ is zero).
Having made those observations, we can dispose of the second (easier) version of the problem, in which $r$ is treated as an unknown (rather than fixed) value to be solved for.  The solutions, for arbitrary integer $\ell$ and nonzero integer $n$, are:
$$ r = \frac{\ell^2 - 1}{n} $$
taken together with the cases $n=0$ already described.
It remains to understand the original version of the problem in which $r$ is a fixed (given) rational number.  Without loss of generality (by virtue of our discussion above) we focus on cases $r \gt 0$.  The problem can then be rephrased as asking for all the perfect squares $\ell^2$ that occur in the arithmetic progression $ 1 + rn, \text{ for all } n\in \mathbb Z $.
As mentioned, Dietrich Burde shows that solving this can be reduced to cases where $r$ is an integer.  Specifically, if positive rational $r$ is in lowest terms $r_1/r_2$ (coprime $r_1,r_2$), then $1 + rn = \ell^2$ implies $1 + r_1 k = \ell^2$ with integer $k = n/r_2$.  One way to see this is that with $r_1,r_2$ coprime, the only way for $rn$ to be an integer is for $k=n/r_2$ to be an integer.
So the perfect squares $\ell^2$ that appear in rational arithmetic sequence $1+rn$ are identical to those that appear in integer arithmetic sequence $1+r_1 k$, where $n = r_2 k$.  At this point it is easy to construct an infinite number of solutions, namely by satisfying:
$$ r_1 k = (\ell - 1)(\ell + 1) $$
either with a choice of $(\ell - 1)$ to be a multiple of $r_1$ or $(\ell + 1)$ to be a multiple of $r_1$.  There can be additional solutions if $r_1\gt 4$ has more than one prime factor.
Cataloging all of them can be somewhat tedious, so let's begin with an example, $r_1 = 12$.  The prime factors of $r_1$ can be split between $(\ell - 1)$ and $(\ell + 1)$ in various ways.  The factors of $2^2$ will be met when $(\ell - 1)$ is even (equiv. when $(\ell + 1)$ is even).  So only the factor $3$ needs to be accounted for, and thus these solutions can be exhausted by requiring $\ell \equiv \pm 1 \bmod 6$.
The general situation where $r_1$ has more than one prime factor can be analyzed in a similar fashion.  If positive powers of $2$ divide $r_1$, then we can allocate them in the obvious way:  all but (at most) one of them must either divide $(\ell - 1)$ or $(\ell + 1)$.  It remains to allocate the odd prime factors of $r_1$.  Since odd primes are greater than two, any odd prime factor would either divide $(\ell - 1)$ or $(\ell + 1)$, but not both.  Note that the Chinese Remainder Theorem allows us to make an arbitrary allocation of distinct odd prime factors between them, and to combine any such partition with an allocation of the powers of two.
A more precise description of solutions therefore hinges on knowing the prime factorization of $r_1$.  When that is available, it is not so much difficult as tedious to identify the complete family of solutions.
A: $$ r = \frac{4 b}{d c h^2} $$
$$ n = dec (h + b e) $$
$$ l =\frac{h + 2 b e}{h} $$
if $$ r=\frac{3}{5}$$ then
$$ b=3; d=4; h=1; c=5 $$
or
$$ b=9; d=5; h=2; c=3 $$
or
...
