2

Suppose $a, b, c \in \mathbb{Z}_{>0}$. The following is a variation of a Pythagorean triple, but with weighted squares:

$$a^2 + 3 b^2 = 4 c^2$$

Can I find something like Euclid's formula that can generate all solutions for this formula? I'm not sure how to approach this problem.

simonzack
  • 1,771
  • 14
  • 32
  • 2
    This is equivalent to finding rational points on the ellipse $x^2 + 3y^2 = 4$, and the same geometric strategy as for Pythagorean triples works: find a single rational point on the ellipse, then take lines with rational slope through that point to generate other rational points on the ellipse. – Daniel Hast Jan 12 '21 at 14:01
  • Hint: one formula that generates infinitely many solutions might not generate all solutions. "Despite generating all primitive triples, Euclid's formula does not produce all triples" - https://en.wikipedia.org/wiki/Pythagorean_triple. – Dávid Laczkó Jan 12 '21 at 14:04
  • @DávidLaczkó The article gives a formula that generates all solutions. – simonzack Jan 12 '21 at 14:10
  • Yes, when the parameter $k$ is added - I just wanted to clarify, that to cover all solutions, one needs to verify that no other solutions exist than the found ones. – Dávid Laczkó Jan 12 '21 at 14:21
  • https://math.stackexchange.com/questions/738446/solutions-to-ax2-by2-cz2/738527#738527 – individ Jan 12 '21 at 15:43

4 Answers4

1

After discovering Find all integers satisfying $m^2=n_1^2+n_1n_2+n_2^2$, the paper Abdelalim, S., & Dyani, H. (2014). The Solution of the Diophantine Equation x2+ 3y2= z2. International Journal of Algebra, 8(15), 729–732. gives an easy answer:

Theorem 2.1 Let $E : x^2 + 3 y^2 = z^2$ diophantine equation and $(x, y, z) \in \mathbb{Z}^3$ with $x \wedge y = 1$, $y$ is even and $x z \wedge 3 = 1$. Then the following properties are equivalent:

  1. $(x, y, z)$ is the solution of $E$.
  2. $| z | = 3 y_1^2 + y_2^2, | x | = 3 y_1^2 - y_2^2, | y | = 2 y_1 y_2$ with $y_1 \wedge y_2 = 1$.

Theorem 2.2 Let $E : x^2 + 3 y^2 = z^2$ diophantine equation and $(x, y, z) \in \mathbb{Z}^3$ with $x \wedge y = 1$, $y$ is odd and $x z \wedge 3 = 1$. Then the following properties are equivalent:

  1. $(x, y, z)$ is the solution of $E$.
  2. $| z | = \frac{3 y_1^2 + y_2^2}{2}, | x | = \frac{3 y_1^2 - y_2^2}{2}, | y | = y_1 y_2$ with $y_1 \wedge y_2 = 1$.

Scaling the above primitive solutions $(x, y, z)$, and in our case restricting to $2 \mid z$, gives all solutions.


The following is a method that is less explicit, as it requires dividing by a $\gcd$.

Thanks to Daniel Hast's comment, I arrived at the following:

Finding such $(a, b)$ is equivalent to finding a single rational point on the ellipse $x^2 + 3 y^2 = 4$, then finding all rational lines through it. A rational point is $(1, 1)$, and a rational line through that is $t y = s x - s + t$ where $\gcd (s, t) = 1$. The other intersection with the ellipse is at:

$$ (x, y) = \left( \frac{3 s^2 - 6 s t - t^2}{3 s^2 + t^2}, - \frac{3 s^2 + 2 s t - t^2}{3 s^2 + t^2} \right) $$

So:

$$ \begin{array}{rll} \left( \frac{3 s^2 - 6 s t - t^2}{3 s^2 + t^2} \right)^2 + 3 \left( \frac{3 s^2 + 2 s t - t^2}{3 s^2 + t^2} \right)^2 & = & 4\\ (3 s^2 - 6 s t - t^2)^2 + 3 (3 s^2 + 2 s t - t^2)^2 & = & 4 (3 s^2 + t^2)^2\\ 4 (3 s^2 + t^2)^2 - 3 (3 s^2 + 2 s t - t^2)^2 & = & (3 s^2 - 6 s t - t^2)^2 \end{array} $$

Note that the numerator and denominators of $x, y$ can be scaled while the rational point stays the same. Let $d = \gcd (3 s^2 + t^2, 3 s^2 + 2 s t - t^2)$. For $k \in \mathbb{Z}$, our solutions are then:

$$ a = \frac{k}{d} \cdot (3 s^2 + 2 s t - t^2) \quad b = \frac{k}{d} \cdot (3 s^2 + t^2) $$

simonzack
  • 1,771
  • 14
  • 32
  • 2
    I realize your original problem only asked for positive integer solutions, but don't forget that the vertical line $x = 1$ is also a line through $(1, 1)$, and the other intersection point with this line is $(1, -1)$. This corresponds to taking $t = 0$. You can avoid making this a special case by writing the equation of the line as $ty = sx - s + t$ in the first step. – Daniel Hast Jan 12 '21 at 16:14
  • Thanks, fixed it now. – simonzack Jan 13 '21 at 11:44
  • $$X^2+aY^2=Z^2$$ $$X=p^2-as^2$$ $$Y=2ps$$ $$Z=p^2+as^2$$ – individ Jan 17 '21 at 14:52
  • @DávidLaczkó Can you give an explicit example missed by the linked paper. I went through the proof and it checks out for me. – simonzack Feb 06 '21 at 05:43
  • 1
    $(13, 8, 19)$ is given by the first theorem when $y_1 = 1, y_2 = 4$. – simonzack Feb 07 '21 at 11:32
  • You are right, I also missed the absolute value logic, my bad. I just deleted my comments as I wrote a lot that is insignificant for future readers. The point is that I don't see where the paper proves that there are no more solutions. I also doubt that the method of finding rational points on the ellipse gave all solutions, I added an update 3 to my answer if you are interested. – Dávid Laczkó Feb 08 '21 at 06:46
  • The paper proves there are no other solutions by proving both theorems, for both the if and only if directions. The ellipse method is simliar. Given any $a, b, c$, we take $x = a/(2c), y = b/(2c)$. Given any $x, y$, we can scale the numerator and denominator to find all possible corresponding $a, b, c$. – simonzack Feb 09 '21 at 07:17
0

As I said in the comment, one needs to verify that no other solutions exist but the found ones. I do not have the time now to verify this (or possibly I might not able to do that anyway), but I want to share my modified pair of Euclid's formula for your case:

$a = 2(m^2 - 3n^2)$
$b = 4mn$
$c = m^2 + 3n^2$

or

$a = 2(3m^2 - n^2)$
$b = 4mn$
$c = 3m^2 + n^2$


Update:
Addressing the comment below: a trivial solution is when
$a = b = c$


Update 2:
Further addressing the comment about $(a, b, c) = (1, 1, 1)$:
if $(a, b, c)$ is a solution of $a^2 + 3 b^2 = 4 c^2$ and all elements in the triplet are even, then dividing all of them by 2 is also a solution, i.e. with
$a = 2a'$
$b = 2b'$
$c = 2c'$
we have
$(2a')^2 + 3(2b')^2 = 4(2c')^2$
$4a'^2 + 3*4b'^2 = 4*4c'^2$
$a'^2 + 3b'^2 = 4c'^2$
so we get the original statement, just with $(a', b', c')$ which therefore is a solution triplet, and this reduction can continue until one element becomes odd.
(And this can be done with any common divisors of all elements, until arriving to a $gcd$ of 1. And with the same logic, if a triplet is a solution, multiplying all elements with the same number is also a solution - so only coprime triplets we should be looking for, but I leave this condition out.)
Now if we set $m = n$ in my second triplet definition above we get
$a = 2(3m^2 - n^2) = 4m^2$
$b = 4mn = 4m^2$
$c = 3m^2 + n^2 = 4m^2$
i.e. we have $a = b = c$. Now setting $m = 1$ we get a solution triplet of $(4, 4, 4)$, and based on the above $(2, 2, 2)$ and $(1, 1, 1)$ are also solutions.

I still can not verify what solution triplets this system is not covering.


Update 3:
In case in any doubt that the solutions so far do not cover all solutions, I pedantically collected and compared them.
First of all, in individ's answer the two systems are equivalent, by substituting $(p + s)$ for $p$ in the second system. The second system as it is now is equivalent with the OP's result with the method of finding rational points on the ellipse (though now it is incorrectly shown, as $a$ and $b$ in the question correspond to a factors of $1$ and $3$, respectively, so $a = \frac{k}{d} \cdot (3 s^2 - 6 s t - t^2)$ and $b = \frac{k}{d} \cdot (3 s^2 + 2 s t - t^2)$ and $c = \frac{k}{d} \cdot (3 s^2 + t^2)$) with the reduction/extension factor of $\frac{k}{d}$ added.
My second system's definiton of $c$ is similar, while $a$ and $b$ are not:
$a = 2(3m^2 - n^2)$
$b = 4mn$
$c = 3m^2 + n^2$
With this system one solution triplet is $(94, 16, 49)$, whose elements are relative primes.
Using $k = d = 1$ with the other answers' system, we see that if we wanted to get the triplet $(94, 16, 49)$, we can use the same values $(m, n)$ that generated the last element as the definition is the same, and these are those values: $(s, t) \in \{(4, 1), (-4, 1), (-4, -1), (4, -1)\}$. Calculating $a$'s and $b$'s for that system we get the following values for each $(s, t)$:
\begin{array}{c|c|c|c|c} {} & {(4, 1)} & {(-4, 1)} & {(-4, -1)} & {(4, -1)}\\\hline a & 23 & 71 & 23 & 71 \\\hline b & 55 & 39 & 55 & 39 \end{array}
As we see, the $(94, 16, 49)$ triplet can not be generated by any $(s, t)$ that gives $49$ as the last element. I wanted to prove that even if we do not set $k = d = 1$ that system can not generate this triplet when I recognised that the answers are lacking the absoulte value in the definitions, however that is valid as all are squared and that might add otherwise not producible triplets to the soution set. I stop the investigation at this point. The problem with those answers is at the moment, that with a lack of proof/theorem which shows how to find all solutions, all identities leaves one with "good luck finding that or a counterexample".
Finally, the paper linked by the OP's answer can generate both $(94, 16, 49)$ and $(71, 39, 49)$, but also lacks the previously mentioned proof/theorem of full coverage, as I commented so.

  • This is false, it misses the obvious solution $(a, b, c) = (1, 1, 1)$. – simonzack Jan 12 '21 at 15:11
  • This is not false (unless I made an algebraic mistake), this means that the trivial solutions must be added to the set, and the open question is if there are still more solutions. – Dávid Laczkó Jan 12 '21 at 15:16
0

Given Euclid's formula $ \quad A=m^2-k^2,\quad B=2mk,\quad C=m^2+k^2\quad$ we can adapt it to yours where

$$(2mk)^2=3B^2\implies 2mk=\sqrt{3}B\implies B=\frac{2mk}{\sqrt{3}}$$

$$(m^2+k^2)^2=4C^2\implies (m^2+k^2)=2C\implies C=\frac{m^2+k^2}{2}$$

None of the $B$-values or $C$-values will be integers for primitive triples and $B$ will not even be rational unless $A=B=C=1$. That triple cannot be generated by the formula using integers $(m,k)$.

poetasis
  • 6,795
0

For the Diophantine equation in general form.

$$aX^2+bY^2=(a+b)Z^2$$

You can record the parameterization of solutions.

$$X=bp^2-(a+b)s^2$$

$$Y=bp^2+2(a+b)ps+(a+b)s^2$$

$$Z=b(p+s)^2+as^2$$

Or in the form that is given in another answer...

$$X=bp^2-2bps-as^2$$

$$Y=bp^2+2aps-as^2$$

$$Z=bp^2+as^2$$

individ
  • 4,405
  • Does this generate all solutions? When I coded $X, Y$ up with your last formula, I get $954$ pairs of $(X, Y)$ for $0 < X, Y < 1000$, whereas I believe there should be $3065$ pairs. I think I still need a formula like this though, as the GCD in my formula makes it hard to bound $s, t$, given upper bounds on $a, b$. – simonzack Jan 15 '21 at 13:39
  • @simonzack Yes. Generate all the solutions. Just need to take into account more solutions-by swapping variables $X,Y$. And also take into account the fact that there are solutions that are not mutually simple to each other. – individ Jan 15 '21 at 14:45
  • I solved this for $X = 1, Y = 1$, and I don't get integer solutions for $p, s$. I get $(p, s) \in \left{ \left( - \frac{1}{3} \sqrt{3}, 0 \right), \left(\frac{1}{3} \sqrt{3}, 0 \right), (0, - i), (0, i) \right}$. So your equation appears to miss this case, among others. – simonzack Jan 16 '21 at 08:47
  • @simonzack No. These solutions are obtained. Divide by the total multiplier. $p=1$, $s=1$ $$X=-(b+a)$$ $$Y=b+a$$ $$Z=b+a$$ And this is the same as $$X,Y,Z = 1$$ – individ Jan 17 '21 at 05:59
  • Do you mean dividing $X, Y, Z$ by $a + b$? That gives $X, Y = -1, 1$ and not $X, Y = 1, 1$. Also does this mean your solution requires dividing the GCD as well? – simonzack Jan 17 '21 at 06:11
  • @simonzack In general, the parameterization of solutions of the Diophantine equation is written as solutions multiplied by a common divisor. Many people forget about it... and when the formulas themselves are given, there is no mention of it. In order not to clutter up the formula, they usually do not write and omit it. – individ Jan 17 '21 at 07:57
  • I think what you mean by the common divisor multiplication is what I call reduction in my answer, and it also works the other direction by extension. So it generates infinitely many solutions from one existing solution. However by fixing one definition of $b$ (with your notation $Y$), I found two distinct triplets, which can not be generated from each other with reduction/extension. Now in your general case, I think with some kind of combinatorics we would need to see if we have generated all possible identities with one element's definition fixed - but that might be still no full coverage. – Dávid Laczkó Feb 05 '21 at 17:16
  • I just recognised, that these are definitely not all the solutions, because you have in both definitions $X < Y$, however e.g. for the OP's equality $(26,16,19)$ and $(94,16,49)$ are solutions. – Dávid Laczkó Feb 06 '21 at 18:12
  • 1
    @DávidLaczkó no. You did not take into account the fact that the sign for example $s=-s$ can change. And where there was a minus in the formula will be +. And vice versa. – individ Feb 07 '21 at 05:18
  • You are right, for some reason I was thinking in positive paramaters only, my bad. However I am in doubt of full coverage, I added an update 3 to my answer if you are interested. – Dávid Laczkó Feb 08 '21 at 06:48