6

In Édouard Lucas publication #9, "Recherches sur l'analyse indéterminée et l'arithmétique de Diophante" on page 67 is this:

PROBLÈME IV. — Trouver trois carrés inégaux tels que la somme de deux quelconques d’entre eux diminuée du troisième, soit un carré parfait.$^1$

English translation is:

Find three unequal squares such that the sum of any two of them minus the third is a perfect square.

Lucas does not seem to give any solutions to this problem.

In the book L. E. Dickson, History of the Theory of Numbers, Volume II, Chapter XIX, section "$x^2+y^2,\, x^2+z^2,\, y^2+z^2$ ALL SQUARES", pp. $497$-$502$ on page $501$ near the top is this:

Hence $x^2+y^2 = \zeta^2, \, y^2+z^2 = \xi^2, \, z^2+x^2 = \eta^2$ for $$ x = 8rs(r^4-s^4); \qquad \xi = (r^2+s^2)^2; \qquad y,\, \zeta = (r^2-s^2)\{(r^2+s^2)^2 \mp 16r^2s^2\};\\ z,\, \eta = 2rs\{(r^2+s^2)2 \mp 4(r^2-s^2)^2\}. $$ $\qquad$ C. Leudesdorf$^{18}$ solved the equivalent system $\, 2(u^2+v^2-w^2)=x^2,\,$ $2(u^2+w^2-v^2)=y^2,\, 2(v^2+w^2-u^2)=z^2\,$ by use of trigonometric functions (cf. Gill$^{13}$). G. Heppel repeated Neuberg's$^{17}$ solution.

That is the closest reference in Dickson's book (similar but not the same because of the factors of $2$) that I could find for the problem of finding positive integer solutions to

$$ x^2+y^2-z^2 = a^2,\;\; x^2+z^2-y^2 = b^2,\;\; y^2+z^2-x^2 = c^2. $$

Since the equations are homogeneous, it is sufficient to find all integer solutions that are relatively prime. I did a small search with the results in a small table of values $\,0<x<y<z<1999$: $$\begin{array}{|c|c|c|c|c|c|} \hline x & y & z && a & b & c \\ \hline 149 & 241 & 269 && 89 & 191 & 329 \\ \hline 205 & 373 & 425 && 23 & 289 & 527 \\ \hline 397 & 593 & 707 && 97 & 553 & 833 \\ \hline 493 & 797 & 937 && 17 & 697 & 1127 \\ \hline 595 & 769 & 965 && 119 & 833 & 1081 \\ \hline \end{array}$$

Are there any parametric solutions? How to find all solutions?


As mentioned by Will Jagy in the comments, in Dickson on page $254$

$\qquad$ Welsch$^{171}$ stated that the general solution of $\,u^2 + x^2 = y^2 + z^2\,$ is $$ 2x = ab+cd, \quad 2y = ac+bd, \quad 2z = ab-cd,\quad 2u = ac-bd, $$ where $a,d$ are even, or $b,c$ are even, or all four are odd.

Very close to that is on page $252$

$\qquad$ P. Pasternak$^{152}$ proved that all solutions of $\,x^2 + y^2 = v^2 + w^2\,$ are $$ x = m\omega + np, \quad v = m\omega - np, \quad y = n\omega -mp, \quad w = n\omega + mp, $$ whence $$ x^2 + y^2 = (m^2+n^2)(\omega^2+p^2). $$

This is easily found by expressing $x^2 + y^2$ using Gaussian integers. If there was only one such equation we would be done. However, there are three such related equations and I can't see how to satisfy them all at once.


As mentioned by Will Jagy also in comments, in Dickson on pages $507$ to $509$ is the section "THREE SQUARES, SUM OF ANY TWO LESS THIRD A SQUARE" which is exactly the Lucas problem. I somehow missed the obvious. Euler gave four methods to solve the problem. Legendre and a few others are also mentioned but no mention of Lucas. The only explicit numeric solution given is the minimal $\,x=241, y=269, z=149.$

One answer to this question gives a one parameter family of solutions involving tenth degree polynomials. I would like a more simpler parametrization, perhaps with two parameters. Maybe even the complete set of solutions but that seems unlikely.

Somos
  • 35,251
  • 3
  • 30
  • 76
  • 2
    page 254 in volume II, Welsch on $u^2 + x^2 = y^2 + z^2$ has parameters $a,b,c,d$ with $2u=ac-bd,$ $2x=ab+cd,$.. Uses: if $pq=rs$ in integers, may construct $i,j,k,l$ with $p=ij, q=kl,r = jk, s=il$ – Will Jagy Oct 06 '22 at 00:52
  • 1
    interesting repeats, $(x,y,z)=(9635, 9605, 769)$ and $(a,b,c)=(119, 1081, 13583)$ compare your fifth row – Will Jagy Oct 06 '22 at 03:53
  • 1
    Also, $(x,y,z)=(5405,5383, 965)$ and $(a,b,c)=(833, 1081, 7567)$ compare your fifth row again. – Will Jagy Oct 06 '22 at 03:58
  • @WillJagy This seems to suggest some form of Vieta jumping... – Ivan Neretin Oct 06 '22 at 10:17
  • @IvanNeretin to an extent. The ones I mentioned are examples where one of $a,b,c$ is a multiple of a smaller one, multipliers $7, 41, 239...$ being the $u$ in $u^2 - 2 v^2 = -1$ – Will Jagy Oct 06 '22 at 18:02
  • The value $798$ in row $4$ in your table seems to be a typo (I got $797$ ) – Gottfried Helms Oct 24 '22 at 13:29
  • @GottfriedHelms Thanks for that info! I fixed the typo now. – Somos Oct 24 '22 at 14:13
  • I'm trying to apply a recent work on coupled Pell-equations of a certain type (in the current case $a^2+b^2=2 c^2$). This is possibly related to the last paragraph in your question. I could not yet derive a handy solution for you, but because the "coupled Pell equation" problem occurs in the same way in the "magic square-of-squares" problem I thought I give it a try. You might be interested in https://math.stackexchange.com/q/4320733 and my best current self-answer https://math.stackexchange.com/a/4561999 . Magic SquareOfSquares: https://math.stackexchange.com/a/175762 if interesting as well. – Gottfried Helms Oct 26 '22 at 12:40
  • @WillJagy Hey, long time no see! Anyway, the "repeated" entries you observed are part of infinitely many solutions. One uses an elliptic curve and the Pell equation you mentioned. Kindly see my answer below. – Tito Piezas III Nov 16 '22 at 07:52
  • @GottfriedHelms: Care to use your computer program to tackle the case $n=239$? I found a parameterization that covers Jagy's observation about "repeated" entries. It should be explained in my answer below. – Tito Piezas III Nov 16 '22 at 08:00
  • @TitoPiezasIII - hmmm, it looks as if we come in the neighbourhood of the Pell's equation which occur in the Magic Square of Squares problem... very difficult matter. I'm giving it a try; btw. have you taken a look into my two Q/A linked to in the "Linked" list at the OP? That approach in it looks a bit like your given extension to quintuples. let's see whether there is something useful in it... – Gottfried Helms Nov 16 '22 at 09:42
  • @GottfriedHelms After some more tinkering, I found a polynomial parameterization that works for $n=239$ and in fact all $n$ of the Pell equation. I'll modify my answer, and will look at your linked post soon. – Tito Piezas III Nov 16 '22 at 10:36

4 Answers4

4

Re: Below equation

$x^2+y^2-z^2 = a^2,\;\; x^2+z^2-y^2 = b^2,\;\; y^2+z^2-x^2 = c^2$

"OP" in one of his nine edits to his question requested a parametrization of degree less than ten. Well if he had looked carefully at euler's solution he would have noticed that it is of degree six. Since "OP" equation is of second degree with six variables & only three equations I think it is difficult to reduce the degree of the solution to one below six, eventhough there is a smaller numerical solution,(x,y,z,a,b,c)=(5,5,1,1,7,1).

For ready reference Euler"s solution is shown below:

$x=(m^6+6m^5n+38m^4n^2+88m^3n^3+76m^2n^4+24mn^5+8n^6)$

$y=(5m^6+22m^5n+30m^4n^2+24m^3n^3+60m^2n^4+88mn^5+40n^6)$

$z=(m^2-2n^2)(5m^4+24m^3n+52m^2n^2+48mn^3+20n^4)$

$a=(m^2+4mn+2n^2)(m^4-8m^3n-28m^2n^2-16mn^3+4n^4)$

$b=(m^2-2n^2)(m^4+16m^3n+36m^2n^2+32mn^3+4n^4)$

$c=(m^2-2n^2)(7m^4+32m^3n+60m^2n^2+64mn^3+28n^4)$

for, $(m,n)=(1,1)$ we get:

$(x,y,z)=(241,269,149)$ & $(a,b,c)=(191,89,329)$

"OP" also inquired about a general solution to his equation. The equation has been around since the time of Euler for over two hundred years. By now somebody would have found a general solution. Which goes to show that a general solution would be quite difficult.

Daniel
  • 41
3

Mathematician Seiji Tomita has given a parametric

solution on his website article # 201 in the section

2nd powers. His web site link is given below:

http://www.maroon.dti.ne.jp/fermat/dioph187e.html

The parametric solution is shown below:

$x = (k^2+1)(k^8-8k^6+30k^4-8k^2+1)$

$y = (k^2-2k-1)(k^8+8k^6-2k^4+8k^2+1)$

$z = (k^2+1)(k^4-4k-1)(k^4-4k^3-1)$

$a = (k^2-2k-1)(k^4+4k-1)(k^4+4k^3-1)$

$b= (k^2+2k-1)(k^4-4k-1)(k^4-4k^3-1)$

$c = (k^2-2k-1)(k^4-4k-1)(k^4-4k^3-1)$

$x^2+y^2-z^2 = a^2$

$x^2+z^2-y^2 = b^2$

$y^2+z^2-x^2 = c^2$

For, $k=2$ we have:

$(x,y,z)=(965,769,595)$

$(a,b,c)=(1081,833,119)$

Euler also has given solution in volume (2) of Dickson book.

Daniel
  • 46
  • Euler was very prolific. What page number in Dickson? – Somos Oct 06 '22 at 11:51
  • volume 2, chapter 19, pages 507-509 in the Chelsea 1971 printing – Will Jagy Oct 07 '22 at 20:23
  • Ouch!! That whole section is exactly about the problem. I must have missed the obvious. Dickson also failed to mention Lucas in that section, but I didn't see Lucas giving any explicit solution. – Somos Oct 07 '22 at 21:46
3

(Note: Hi M. Somos, long time no see!)

The OP asks for a triplet of integers which obey the relations in the title. Thanks to an observation by Will Jagy who observed that pairs of triplets may be related, we give infinitely many solutions to that special subset using a Pell equation and elliptic curves.

The trick is to find a quintuplet of distinct integers $a,b,c,d,e$ such that,

$$\begin{align} -a^2+b^2+c^2 &= \color{blue}{p^2}\\ a^2-b^2+c^2 &= \color{blue}{(nq)^2}\\ a^2+b^2-c^2 &=q^2 \end{align}$$

which continues as, $$\begin{align} -c^2+d^2+e^2 &= (np)^2\\ c^2-d^2+e^2 &= \color{blue}{p^2}\\ c^2+d^2-e^2 &= \color{blue}{(nq)^2} \end{align}$$

The blue squares (and the shared "$c$" variable) explain the "repeated" entries found by Jagy. The solution is simply,

$$\begin{align} a &= mq\\ b &=\sqrt{\frac{p^2+q^2}2}\\ c &=\sqrt{\frac{p^2+n^2q^2}2}\\ d &= nb\\ e &= mp \end{align}$$

where, for some constant $n$, one must solve for $(p,q)$ in the simultaneous equations for $(b,c)$ while $(m,n)$ are just solutions of the Pell equation, $$2m^2-n^2=1$$

The variables $(m,n)$ are easy to find, $$m = 1,5,29,169,\dots$$ $$n\,= 1,7,41,239,\dots$$

So once a particular $n>1$ is chosen, then we must find $(p,q)$ to solve the simultaneous equations for $(b,c)$. However, two quadratic polynomials to be made squares is just an elliptic curve in disguise, so once an initial rational point is found, then there are an infinite more.

Example 1. Let $n=7$, then,

$$(p,q) = (1081,119)$$ $$(p,q) = (150925559,27174841)$$

yields, $$(a,b,c,d,e) = (595, 769, 965, 5383, 5405)$$ $$(a,b,c,d,e) = (135874205, 108436609, 171702725, 759056263, 754627795)$$

respectively, though smaller $(p,q)$ than the 2nd one may be found by brute force.

Example 2. Let $n=41$, then,

$$(p,q) = (1127,17)$$ $$(p,q) = (1237321, 175559)$$

yields, $$(a,b,c,d,e) = (493, 797, 937, 32677, 32683)$$ $$(a,b,c,d,e) = (5091211, 883681, 5164349, 36230921, 35882309)$$ and so on.


$\color{red}{\text{Update:}}$ (A few hours later.) The question remains if, $$\begin{align} b &=\sqrt{\frac{p^2+q^2}2}\\ c &=\sqrt{\frac{p^2+n^2q^2}2} \end{align}$$

has solutions $(p,q)$ for all $n$ of the Pell equation $n^2=2m^2-1$. Turns out IT DOES,

$$\begin{align} p &=\frac{7m^4-2m^2-1}4\\ q &=\frac{m^4-6m^2+1}4 \end{align}$$

So from this rational point, one can construct infinitely many polynomial parameterizations that yield Jagy's special quintuples $a,b,c,d,e$. However, I'm not sure if the above is the simplest one.

  • Hmm, interesting. I'll try with $(n,m)=(239,169)$ later. For the moment, did you notice that by rearranging we must have also $\left{\begin{align} a^2+e^2 & = 2 (mb)^2 \ 2d^2 &= 2(nb)^2 \end{align} \right}$ ? – Gottfried Helms Nov 16 '22 at 09:24
  • @GottfriedHelms: I deleted my question about $n=239$ since I found the general solution. And no, I didn't notice that rearrangement. – Tito Piezas III Nov 16 '22 at 11:05
  • @WillJagy The answer above explains the "repeated" entries you observed. – Tito Piezas III Nov 25 '22 at 02:29
2

Just xyz triples with $ x > y > z.$ However, this output was $c \leq 204631 $ Since $x > \frac{c}{\sqrt 2}$ we know we have all primitive ordered triples with $x < 144695.$

ummm. Your system is the same as $$ 2x^2 = b^2 + c^2, 2y^2 = c^2 + a^2, 2z^2 = a^2 + b^2 $$

$$ \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc $$

      x       y       z           a       b       c   gcds: (b,c)   (c,a)   (a,b)
     269     241     149          89     191     329         1       1       1  
     425     373     205          23     289     527        17       1       1  
     707     593     397          97     553     833         7       1       1  
     937     797     493          17     697    1127  W       1       1      17  
     965     769     595         119     833    1081  W       1       1     119  
    3875    3535    1613         287    2263    4991        31       7       1  
    5309    4181    3769        1871    4991    5609         1       1       1  
    5405    5383     965         833    1081    7567  W    1081       7       1  
    5413    5245    1825        1241    2263    7313         1       1      73  
    6355    6341     575         391     713    8959        31      17      23  
    6755    6697    3365        3247    3479    8897         7       1       1  
    7853    6755    5305        3479    6647    8897         1       7       1  
    8473    8323    1613         287    2263   11767  W       1     287       1  
    9131    8995    1585         217    2231   12719        23       7       1  
    9635    9605     769         119    1081   13583        47      17       1  
   11285   10781    4705        3319    5767   14881         1       1       1  
   12325   12185    2549        1751    3151   17143         1       1       1  
   12325   12197    4105        3703    4471   16847        17       1       1  
   12913   11795    8405        6559    9913   15337         1       7       1  
   13073   12995    1435         161    2023   18377        17      23       7  
   13877   12383    7213        3577    9553   17143         1       7       1  
   15883   14453   10337        7967   12257   18823         7       1       1  
   16285   14977    9725        7327   11639   19873         1      17       1  
   17843   15685    8825        2351   12257   22057         7       1       1  
   19093   15317   12697        5593   17063   20927         1      17       1  
   23611   21551   18709       16031   21049   25921         7      23       1  
   24469   22721    9701        3409   13289   31951         1       1       1  
   27101   26075    9265        5593   11849   36449        41       7      17  
   27541   27475    3335        2737    3841   38759         1       7      23  
   27715   26225   11413        7063   14513   36409        23       1       1  
   31337   29857   21953       19783   23927   37303         1      73       1  
   32683   32677     937         697    1127   46207  W    1127      41       1  
   37099   36865    5125        2993    6601   52049        23      73      41  
   39895   39835    2389         961    3239   56327        79      31       1  
   47243   46847    9797        7663   11543   65807       119      79      97  
   48889   48725    5045        3073    6439   68839         1       1       1  
   49021   46031   23941       16999   29281   62839       329     191      89  
   54947   52685   15655        1271   22103   74497        23      41      31  
   55783   52897   18793        6287   25823   74543         7       1       1  
   58835   58693    5185        3193    6601   82943       287       1       1  
   58837   56393   20557       11873   26537   78863        17       1       1  
   59093   49483   34007       10633   46903   69167         1       7      31  
   61153   54077   46933       37247   54937   66793         1      17       1  
   63341   57461   28679       10591   39151   80569         1       1     119  
   66133   65627    8473        2263   11767   92783  W      41    2263       1  
   69215   63325   31067       13583   41783   88519       127      17      47  
   70201   64849   27529        5921   38479   91519         1       1       1  
   76235   75175   37163       34937   39263  100409        79      31       7  
   76985   75973   12605        2023   17711  107423        89      17       1  
   82615   82381   28565       27881   29233  113119      1271       1       1  
   82715   68579   48415       14329   66953   95921        71       7      23  
   82913   80647   28033       20377   34007  112217         1     287       1  
   83419   77621   35089       17249   46529  108409       119       1       1  
   87949   86459   22601       15841   27761  121241         1      31       1  
   92483   79505   47765        7031   67183  112217        23       1       1  
   99355   94945   54971       46529   62279  125953        31      17       7  
  105661   96841   92491       82271  101689  109489         1       1     511  
  109045   86503   66725        6647   94129  122153       113      23      17  
  112325  102095   49213       15113   67937  143591         1       7       1  
  113975  111115   27173        9727   37177  156839        47      71       1  
  118609  116231   47921       41689   53431  159001        17      47       1  
  125215  124645   12307        3007   17143  176249        79      97      31  
  131767  128423   35567       19873   46207  180527        23     167       7  
  131999  131569   15929       11849   19159  185689         7      41      17  
  137965  100889   94165        3361  133127  142639        41       1       1  
  141593  128977   58873        7247   82943  182257        17       1       1  
  146417  139693   70397       55063   82943  189727         1       1     697  
  146693  143597   50033       40057   58327  199087        17       1       1  
  152299  150289  100211       97129  103201  189049         7       1      23  
  163481  156425   98455       86233  109319  203719         1       1     679  
  177079  154031  114929       74681  144361  204631       287      23       1  
  178303  143513  106127        8183  149863  202793        79       1       7  
     x       y       z           a       b       c   gcds: (b,c)   (c,a)   (a,b)

$$ \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc $$

#include <iostream>
#include <stdlib.h>
#include <fstream>
#include <strstream>
#include <list>
#include <set>
#include <math.h>
#include <iomanip>
#include <string>
#include <algorithm>
#include <iterator>
#include <gmp.h>
#include <gmpxx.h>
#include "form.h"

using namespace std;

int main() { //cout << endl; //system("date"); mpz_class a,b,c,d,e,f, x,y,z;

int step = 0;

for(c=1; c <= 1234567890; ++c) {

for(x=c-1; 2xx > cc; --x){ if(mp_SquareQ(2xx - cc)) {

b=mp_Sqrt(2xx - cc); for(a=1; a < b; ++a){ if( mp_SquareQ(2aa + 2bb) && mp_SquareQ(2aa + 2cc) ) { z = mp_Sqrt(2aa + 2bb); z /= 2; y = mp_Sqrt(2aa + 2c*c); y /= 2;

if ( mp_coprime3(x,y,z)) { cout << setw(8) << x << setw(8) << y<< setw(8) << z<< setw(12) << a<< setw(8) << b<< setw(8) << c << " "; if(b % a == 0 || c % a == 0 || c % b == 0) cout << "W"; cout << setw(8) << mp_GCD(b,c)<< setw(8) << mp_GCD(c,a)<< setw(8) << mp_GCD(a,b) << " "; ++step; cerr << " success " << step << ": "<< setw(8) << x << setw(8) << y<< setw(8) << z<< setw(12) << a<< setw(8) << b<< setw(8) << c << " "<< endl; cout << endl; } // if coprime } // if squares } // for a } // if square }} // c x

cout << endl << endl << endl;

return 0; } // g++ -o mse mse.cc -lgmp -lgmpxx

$$ \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc $$

Will Jagy
  • 139,541
  • Will, I knew about the $2x^2=b^2+c^2, etc.$ since it is easy algebra. You seem to have found more triples but my search was not that efficient. However, you have not answered any of my questions. – Somos Oct 06 '22 at 13:38
  • Please share your code for finding solutions because it is much better than mine. Thank you for sharing your search results. – Somos Oct 07 '22 at 11:31
  • So you used C++ with gmp library. No wonder. By the way, to format code with MathJax you can use ``` at begin and end of code block. No need to indent 4 spaces. – Somos Oct 07 '22 at 21:32