For which $n$ can $(a, nb, c)$ and $(b, c, d)$ be Pythagorean triples?

Fermat proved that if $(a, b, c)$ is a Pythagorean triple, then $(b, c, d)$ cannot be a Pythagorean triple.

Suppose $(a, nb, c)$ form a Pythagorean triple. Can $(b, c, d)$ be a Pythagorean triple? For which $n$ is this possible?

Another formulation is the following Diophatine system of equations:

$$a^2 + n^2b^2 = c^2$$ $$c^2 + b^2 = d^2$$

Fermat's theorem is then that $n$ cannot equal 1.

Searching with a computer for $d < 50,000$ and $n < 100$, I have found solutions for $n = 6, 16, 30, 48, 84$. For example, $n = 6$ has the solution $(a, b, c, d) = (99, 28, 195, 197)$ because $(99, 6*28, 195)$ and $(28, 195, 197)$ are both triples.

I am especially interested if there are any $n \neq 1$ that can be ruled out.


Solution 1:

An infinite family for even $n$: Given integer $t \geq 2,$ $$ n = 2 t^2 - 2, \; \; u = 2 t^2 - 1, \; \; v = 2t,$$ $$ a = (t^2 - 1)(u^2 - v^2), \; \; b = u v, \; \; c = (t^2 - 1)(u^2 + v^2), \; \; d = \mbox{something} $$


In the lists below, $\displaystyle\alpha=\frac{2\,u\,v}{b}$ and $\displaystyle\beta=\frac{a}{u^2-v^2}=\frac{c}{u^2+v^2}$ are integers such that $\alpha\beta = n$. For ex, if $n=36$, then,

$$\small\alpha=\frac{2\,u\,v}b =\frac{2\times728\times291}{35308}=12$$ $$\small\beta=\frac{1335909}{728^2-291^2}=\frac{1843995}{728^2+291^2} =3$$

and $\alpha\beta=36$.

I. Data for a handful of odd $n$:

13  a: 230153  b: 12792  c: 283945  d: 284233      u: 507  v: 164
15  a: 32625  b: 3472  c: 61455  d: 61553      u: 56  v: 31
23  a: 523367  b: 57072  c: 1413145  d: 1414297      u: 984  v: 667
27  a: 206703  b: 3848  c: 231345  d: 231377      u: 156  v: 37
89  a: 11534489  b: 700920  c: 63439289  d: 63443161      u: 649  v: 540
105  a: 1516207  b: 36576  c: 4128943  d: 4129105      u: 635  v: 432

II. Data for even $n$:

6 a: 99  b: 28  c: 195  d: 197      u: 7  v: 4
10 a: 619285  b: 75012  c: 972725  d: 975613      u: 399  v: 188
16 a: 1012  b: 51  c: 1300  d: 1301      u: 17  v: 6
20 a: 440075  b: 43428  c: 973685  d: 974653      u: 376  v: 231
30 a: 13455  b: 248  c: 15375  d: 15377      u: 31  v: 8
36 a: 1335909  b: 35308  c: 1843995  d: 1844333      u: 728  v: 291
48 a: 27612  b: 245  c: 30012  d: 30013      u: 49  v: 10
60 a: 432693  b: 29876  c: 1844043  d: 1844285      u: 616  v: 485
70 a: 171395  b: 852  c: 181475  d: 181477      u: 71  v: 12
82 a: 154775  b: 5544  c: 480233  d: 480265      u: 88  v: 63
82 a: 10653071  b: 166440  c: 17313521  d: 17314321      u: 584  v: 285
84 a: 18819  b: 388  c: 37635  d: 37637      u: 97  v: 56
84 a: 32249  b: 3048  c: 258055  d: 258073      u: 144  v: 127
96 a: 221112  b: 679  c: 230520  d: 230521      u: 97  v: 14
110 a: 554389  b: 11940  c: 1425611  d: 1425661      u: 300  v: 199
120 a: 25925  b: 1932  c: 233285  d: 233293      u: 161  v: 144
126 a: 999999  b: 2032  c: 1032255  d: 1032257      u: 127  v: 16
128 a: 23706016  b: 63729  c: 25070240  d: 25070321      u: 873  v: 146
160 a: 1023880  b: 1449  c: 1049800  d: 1049801      u: 161  v: 18
176 a: 2514688  b: 20895  c: 4455088  d: 4455137      u: 199  v: 105
182 a: 163163  b: 6612  c: 1214395  d: 1214413      u: 87  v: 76
198 a: 3880899  b: 3980  c: 3960099  d: 3960101      u: 199  v: 20
224 a: 11390372  b: 87555  c: 22680028  d: 22680197      u: 780  v: 449
240 a: 3455820  b: 2651  c: 3513900  d: 3513901      u: 241  v: 22
286 a: 11696399  b: 6888  c: 11861135  d: 11861137      u: 287  v: 24
336 a: 9483012  b: 4381  c: 9596580  d: 9596581      u: 337  v: 26
348 a: 17692987  b: 17292  c: 18688325  d: 18688333      u: 792  v: 131
390 a: 29658915  b: 10948  c: 29964675  d: 29964677      u: 391  v: 28
408 a: 30845259  b: 63460  c: 40271691  d: 40271741      u: 835  v: 304
432 a: 334020  b: 1067  c: 569244  d: 569245      u: 194  v: 99
448 a: 2621444  b: 2379  c: 2829820  d: 2829821      u: 312  v: 61
448 a: 22478512  b: 6735  c: 22680112  d: 22680113      u: 449  v: 30
510 a: 66324735  b: 16352  c: 66846975  d: 66846977      u: 511  v: 32

center of C++ program for odd $n$

int main()
{
  for( mpz_class k = 1; k <= 700; k += 2){
  for( mpz_class u = 2; u <= 1500; ++u){
  for(mpz_class v = 1; v < u; ++v){
    mpz_class d2 = k * k * u *  u * u * u + (2 * k * k + 4) * u * u * v * v + k * k * v * v * v * v;
    if( mp_SquareQ(d2) && mp_GCD(u,v) == 1 )
    {
       mpz_class a,b,c,d, g;
       a = k * (u * u - v * v);
       b = 2 * u * v;
       c = k * ( u * u + v * v) ;
       d = mp_Sqrt(d2);
       g = mp_four_GCD(a,b,c,d);
       a /= g; b /= g; c /= g; d /= g;
      cout <<  k << "  a: " << a << "  b: " << b << "  c: " << c << "  d: " << d << "      u: " << u << "  v: " << v << endl;
    }

   }}}


    return 0 ;
}

C++ program for even $n$

int main()
{
  for( mpz_class k = 1; k <= 300; k += 1){
  for( mpz_class u = 2; u <= 500; ++u){
  for(mpz_class v = 1; v < u; ++v){
    mpz_class d2 = k * k * u *  u * u * u + (2 * k * k + 1) * u * u * v * v + k * k * v * v * v * v;
    if( mp_SquareQ(d2) && mp_GCD(u,v) == 1 )
    {
       mpz_class a,b,c,d, g;
       a = k * (u * u - v * v);
       b =  u * v;
       c = k * ( u * u + v * v) ;
       d = mp_Sqrt(d2);
       g = mp_four_GCD(a,b,c,d);
       a /= g; b /= g; c /= g; d /= g;
      cout << 2 * k << "  a: " << a << "  b: " << b << "  c: " << c << "  d: " << d << "      u: " << u << "  v: " << v << endl;
    }

   }}}


    return 0 ;
}

Solution 2:

An Attempt

You have $a^2+\left(n^2+1\right)b^2=d^2$. All integral solutions $(a,b,d)$ to this equation satisfies (1) $|a|=|d|$ and $b=0$, or (2) $d\neq 0$ and $\left(\frac{a}{d},\frac{b}{d}\right)=\left(\frac{\left(n^2+1\right)r^2-1}{\left(n^2+1\right)r^2+1},\frac{2r}{\left(n^2+1\right)r^2+1}\right)$ for some $r\in\mathbb{Q}$.

Now, if $b^2+c^2=d^2$, then (1) $|c|=|d|$ and $b=0$, or (2) $d\neq 0$ and $\left(\frac{b}{d},\frac{c}{d}\right)=\left(\frac{2s}{s^2+1},\frac{s^2-1}{s^2+1}\right)$ for some $s\in\mathbb{Q}$. Thus, we have to find $r,s\in\mathbb{Q}$ such that $$\frac{r}{\left(n^2+1\right)r^2+1}=\frac{s}{s^2+1}\,.$$ Consequently, $$rs^2-\big(\left(n^2+1\right)r^2+1\big)s+r=0\,.$$ This means $$\big(\left(n^2+1\right)r^2+1\big)^2-4r^2=q^2$$ for some $q\in\mathbb{Q}$. Hence, $$\left(n^2+1\right)^2r^4+2\left(n^2-1\right)r^2+1=q^2\,.$$ Therefore, we have $$\left(\left(n^2+1\right)r^2+\frac{n^2-1}{n^2+1}\right)^2+\left(\frac{2n}{n^2+1}\right)^2=q^2\,.$$

We have again run into a Pythagorean problem. Using a similar argument, the problem boils down to finding $(r,u)\in\mathbb{Q}\times\mathbb{Q}$ satisfying $u\neq 0$ and $$\frac{\left(n^2+1\right)^2r^2+\left(n^2-1\right)}{n}=\frac{u^2-1}{u}\,.$$ For example, $(n,r,u)=\left(6,\frac27,-\frac2{49}\right)$ produces $(n,a,b,c,d)=(6,99,28,195,197)$. I do not have any idea how to proceed further than this. (To be honest, I haven't reduced the number of variables at all. Being rationals, $r$ and $u$ each account for $2$ integer variables.)

Will Jagy's infinite family is produced by $$(n,r,s,q,u)=\left(2\left(t^2-1\right),\frac{t}{2t^2-1},t\left(2t^2-1\right),\frac{4t^6-4t^4+t^2-1}{\left(2t^2-1\right)^2},-\frac{2}{\left(2t^2-1\right)^2}\right)$$ for $t=2,3,\ldots$.