Let's say I have the Diophantine equation $$ x^2+3n^2 = y^2+3z^2. \tag{$\star$} $$ where $n$ is a known integer, and we're trying to determine solutions in integers $x,y,z \ge 1$. Rewrite ($\star$) as $$ x^2 - 3z^2 = y^2 - 3n^2 = k, \tag{$\dagger$} $$ where $k$ is some unknown integer. For simplicity's sake, let's consider the case $n=1$, so we have $$ x^2 - 3z^2 = y^2 - 3(1)^2 = k, \tag{$\Diamond$} $$ Evidently, $(y,1)$ must be the fundamental solution of the equation $U^2-3V^2=k$. Now either $\lvert z \rvert=1$ implying $\lvert x \rvert=\lvert y \rvert$, or $\lvert z \rvert>1$ implying $\lvert x \rvert > \lvert y \rvert$. Let's assume the more interesting latter case.

My question is: can Pell equation machinery — in particular, some form of descent/ascent — be used to solve the original equation, or at least give formulas for $x$ and $z$ in terms of $y$ and $1$ (or some other permutation of the elements)?

I realise we don't know how far “up the ladder” the solution $(x,z)$ is, but I thought there might be some known and effective results in this direction.

EDIT: Also of interest to me would be an answer in the special case where $y$ is an unknown integer with a known parameterization, e.g. $y=ab+cd$ for positive [but possibly unknown] integers $a,b,c,d$.


The complete solution to,

$$x_1^2+mx_2^2 = x_3^2+mx_4^2\tag{1}$$

is given by,

$$(a c + b d m)^2 + m(a d - b c)^2 = (a c - b d m)^2 + m(a d + b c)^2\tag{2}$$

known as the Brahmagupta-Fibonacci identity.

We wish to solve $ad-bc = \pm n$ in the integers for some constant $n$. We can do this as a Pell-like eqn by using the substitution $a,b,c = q^2,\, p+q,\, p-q$ to get,

$$ad-bc = p^2-(d+1)q^2 = \pm n\tag{3}$$

for some arbitrary $d$. For some constant $\pm n$, there is an indefinite number of $d$ that will do, each one of which will lead to a different Pell-like eqn with an infinite number of integer solutions. (Note that this Pell-like eqn doesn't depend on $m$ at all which, in your example, was $m=3$.) The $x_i$ can then be expressed in terms of $p,q$.

More simply, we can just solve $ad-bc = n$ for $d$, let $a=1$, then an explicit formula is,

$$(b^2 c m + b m n + c)^2 + m n^2 = (b^2 c k + b m n - c)^2 + m(2b c + n)^2\tag{4}$$

where one term ($x_2$) remains a constant n regardless of the three free variables $b,c,m$.


One particular solution.

I have already said, where the formula in General.

For the equation: $$3x^2+y^2=z^2+3n^2$$

If you use the solutions of the Pell equation. $p^2-3s^2=1$

And we have a number $y,n$ known. Moreover, any sign.




  • $\begingroup$ Yes, this is a particular solution. Unfortunately, in my case, I don't know $y$, only $n$. However, I'll see if this formula could still be used to help with a descent argument. $\endgroup$ – Kieren MacMillan Sep 25 '14 at 12:09
  • $\begingroup$ @KierenMacMillan $y,n$ - can be any. $\endgroup$ – individ Sep 25 '14 at 13:18

We can at least say that there are infinitely many solutions with the parametrization:

$$(x, y, z) = (7n, 2n, 4n)$$

which gives us

$$(7n)^2 + 3n^2 = (2n)^2 + 3(4n)^2 = 51n^2$$

Of course, I'm sure this does not cover all the possible solutions. For example, if $n$ is even, then another possible parametrization is:

$$(2n)^2 + 3n^2 = \left(\frac{n}{2}\right)^2 + 3\left(\frac{3n}{2}\right)^2 = 7n^2$$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.