Diophantine Equation $3n^2 + 4tn + kr^2 + f = s^2$

80 Views Asked by At

I'm trying to make the following equation a square by adding a value I've called $f$:

$3n^2 + 4tn + kr^2 + f = s^2$

All the other variables are well defined and the equation pertains to integer factorisation. If $C$ is the number to be factorised, it may be written as $t^2 - kr^2$ where $t$ is the ceiling function of the square root of $C$.

But $C$ may also be written as $y^2 - x^2$ where $y$ and $x$ are derived as:

$y^2 = n^2 + 2tn + t^2$

$x^2 = n^2 + 2tn + kr^2$

We're not interested in the trivial solution where $n$ is given by $(C+1)/2 - t$ but rather only the one where $n$ is equal to $y$ minus $t$, i.e.

$n = y - t$

Incidentally, $y$ and $x$ are simply $(b+a)/2$ and $(b-a)/2$ respectively. The original equation that I'm trying to find a suitable $f$ value for whilst maintaining the constancy of $n$ is given by taking the $x^2$ equation and adding $2ny$ to it, which is just $2n(t+n)$. There will always be multiple $f$ values which when added to $x^2 + 2ny$ result in it becoming a square, but the question is twofold, how to find these $f$ values WITHOUT factorising $C$ beforehand, and secondly ensuring that the original $n$ value is still valid, i.e. remains unchanged in the equation, in equalling the square $s^2$. (i.e. the only change is the addition of $f$).

I have a feeling there is a simple solution to be found somewhere, I've just not been able to find it as of yet, so would really appreciate any help. Thanks.

1

There are 1 best solutions below

1
On

This is not a full answer, but essentially the solution to this problem lies in quasi-Pythagorean triples all conforming to the following equation:

$4(R+3) + (R+2)^2 = (R+4)^2$

I say quasi, because if you deliberately restrict yourself to picking $R$ such that $R+3$ is also a square, then it generates Pythagorean triples, though this isn't necessary for the answer to the original question. It turns out that a Pythagorean triple is always involved in the solution to the original equation, namely such that:

$(2n + t)^2 = (n + m)^2 + (t+3n+m)(t+n-m)$

The last part of this equation, $(t+3n+m)(t+n-m)$, must equal a square. Then $f$ is given by $C - 2nm - m^2$ where $C$ is the original composite number to be factored.

Each term in the quasi-Pythagorean equation has a multiplier, which is $((2m-t)/R)^2$. Though this post doesn't cover the workings-out in much depth, that is basically it. It would take several pages more to go over it step-by-step, which I don't have time to do now, but may revisit at some point in the future. Thanks.