# Triples of positive integers $a,b,c$ with rational $\sqrt{\frac{c-a}{c+b}},\sqrt{\frac{c+a}{c-b}}$

While working on a physics problem, I came up with a certain question in number theory:

For positive integers $c>b>a$, can $\dfrac{c-a}{c+b}$ and $\dfrac{c+a}{c-b}$ both be rational squares?

I asked this question on MSE chat (link) and a number of small solutions were quickly found, e.g. $$(a,b,c)=(2,13,14), (11,13,14), (9,23,27), (16,56,65).$$ A list of other such examples was provided by DHMO during that conversation.

These solutions are moreover primitive, in that further solutions can be generated from them by multiplying $(a,b,c)$ through by a common integer square. In that respect, the problem is analogous to that of finding Pythagorean triples. In that case, there is a well-known formula for generating a (primitive) Pythagorean triple from a pair of (coprime) integers.

What I want to know for this question: Is there an analogous formula that generates primitive triples satisfying the above condition?

• Question of the week ! – mick Jan 20 '17 at 0:52

In order to get all solutions, it helps to write the equations with a term that cancels between numerator and denominator (and thus doesn't need to be a square like the rest of the numerators and denominators):

\left\{\begin{aligned}\frac{c-a}{c+b}&=\frac{q\times r^2}{q\times s^2}\\\frac{c+a}{c-b}&=\frac{t\times u^2}{t\times v^2}\end{aligned}\right.

Breaking that into separate numerators and denominators, SageMathCell gives:

\begin{align} a &= -\frac{s^{2} t u^{2} - {\left(2 \, t u^{2} - t v^{2}\right)} r^{2}}{2 \, {\left(r^{2} - s^{2}\right)}}\\ b &= -\frac{r^{2} t v^{2} + {\left(t u^{2} - 2 \, t v^{2}\right)} s^{2}}{2 \, {\left(r^{2} - s^{2}\right)}}\\ c &= -\frac{s^{2} t u^{2} - r^{2} t v^{2}}{2 \, {\left(r^{2} - s^{2}\right)}}\\ q &= -\frac{t u^{2} - t v^{2}}{r^{2} - s^{2}} \end{align}

Sage returns no solutions when solving for just $a, b, c$, but I'm not sure why. I'm also not enough of a mathematician to know if all of the above is remotely helpful.

Edit: As an example of where the extra variables make things nicer:

solve([q*r^2 == (14-2), q*s^2 == (14+13), t*u^2 == (14+2), t*v^2 == (14-13)], (q,s,t,v))

$$\left[q = \frac{12}{r^{2}}, s = \frac{3}{2} \, r, t = \frac{16}{u^{2}}, v = \frac{1}{4} \, u\right]$$

vs solving for (r,s,u,v), which gives

$$\left[r = \frac{2 \, \sqrt{3}}{\sqrt{q}}, s = -\frac{3 \, \sqrt{3}}{\sqrt{q}}, u = -\frac{4}{\sqrt{t}}, v = \frac{1}{\sqrt{t}}\right]$$

Solve the system.

\left\{\begin{aligned}&\sqrt{\frac{c-a}{c+b}}=\frac{k}{t}\\&\sqrt{\frac{c+a}{c-b}}=\frac{p}{s}\end{aligned}\right.

The solution can be written as.

$$c=t^2p^2-k^2s^2$$

$$a=t^2p^2+k^2s^2-2k^2p^2$$

$$b=t^2p^2+k^2s^2-2t^2s^2$$

• Note that it's impossible for these formulas to give the solution $(a,b,c)=(2,13,14)$. Also, it doesn't necessarily give "primitive" solutions. – Gerry Myerson Jan 20 '17 at 6:30
• @GerryMyerson Another solution is to multiply or to divide by common divisor. $k=2$ ; $t=3$ ; $p=4$ ; $s=1$ $$c=3^{2}4^2-2^{2}1^{2}=140$$ $$a=3^{2}4^{2}+2^{2}1^{2}-2*2^{2}4^{2}=20$$ $$b=3^{2}4^{2}+2^{2}1^{2}-2*3^{2}1^{2}=130$$ Then divide by common divisor $10$ . – individ Jan 20 '17 at 7:48
• I think this is THE answer. It generates all answers ( if we consider removing common divisors , see individs comment ). I do not think improvement is possible ? – mick Jan 20 '17 at 22:59