Primitive Pythagorean triples and connection with prime numbers

1.1k Views Asked by At

On the Wikipedia page $16$ Pythagorean triples with $c \leq 100$ are listed:

$$(3, 4, 5), (5, 12, 13), (8, 15, 17), (7, 24, 25), (20, 21, 29), (12, 35, 37), (9, 40, 41), (28, 45, 53), (11, 60, 61), (16, 63, 65), (33, 56, 65), (48, 55, 73), (13, 84, 85), (36, 77, 85), (39, 80, 89), (65, 72, 97)$$

I noticed that of these $16$ primitive Pythagorean triples $a+b$ is prime in $14$ cases, only the cases $a+b=9+40=49$ and $a+b=39+80=119$ are not primes.

Are there some available computational results much beyond $c \leq 100$ that would confirm intuition that really $a+b$ is almost-always a prime number or this is just some instance of the rule that this is a small sample so it is not quite unusual to have this high percentage of primes?

3

There are 3 best solutions below

2
On

I have been running some programs. It seems that the break even point, where the possible values of your $a+b$ are half prime and half composite for $$ a+b < 1736495 \; , \; $$ a number between one million and two million. I'm impressed. There seems to be a little wobble, up to 1,740,000 I think sometimes there are more primes, sometimes more composite. I guess I know some good ways to investigate that a bit more.

The following may or may not make any sense, but shows that we can take a + b < 1736495 as our break even point.

jagy@phobeusjunior:~$ head -130400 mse.txt | grep P | wc
  65208  260832 1976749
jagy@phobeusjunior:~$ head -130500 mse.txt | grep P | wc
  65252  261008 1978113
jagy@phobeusjunior:~$ head -130600 mse.txt | grep P | wc
  65298  261192 1979539
jagy@phobeusjunior:~$ head -130510 mse.txt | grep P | wc 
  65255  261020 1978206
jagy@phobeusjunior:~$ 
jagy@phobeusjunior:~$ head -130510 mse.txt | tail
     1736329 = 7 * 17 * 14591
     1736369 = 1736369     P  
     1736393 = 1736393     P  
     1736399 = 7 * 248057
     1736407 = 353 * 4919
     1736417 = 1736417     P  
     1736431 = 17 * 23 * 4441
     1736441 = 7 * 248063
     1736473 = 41^2 * 1033
     1736489 = 1009 * 1721
jagy@phobeusjunior:~$ 
jagy@phobeusjunior:~$ 
jagy@phobeusjunior:~$ head -130515 mse.txt | tail
     1736417 = 1736417     P  
     1736431 = 17 * 23 * 4441
     1736441 = 7 * 248063
     1736473 = 41^2 * 1033
     1736489 = 1009 * 1721
     1736497 = 7 * 248071
     1736519 = 1736519     P  
     1736551 = 1097 * 1583
     1736561 = 337 * 5153
     1736567 = 7 * 17 * 14593
jagy@phobeusjunior:~$ 

ORIGINAL:

The number you are asking about, for a primitive Pythagorean triple, is $$ n^2 + 2nm - m^2 $$ when $\gcd(m,n) = 1$ and they are not both odd. The usual way to talk about this is to take integrs $x,y$ with $x = n + m$ and $y = m,$ so we still have $\gcd(x,y) = 1$ and now $x$ is odd. Finally $$ a+b = x^2 - 2 y^2 . $$ Since $x,y$ are coprime, and $x$ is odd, this number can be divisible only by primes $$ p \equiv \pm 1 \pmod 8. $$ The first few such primes are $$7, 17 , 23 , 31, 41, 47, 71 , 73, 79, 89, 97, 103, 113, 127, 137, 151, 167, 191, 193, 199, 223, ... $$ The two smallest products of these primes are $49$ and $119.$ You have seen both. Those are as small as possible.

 Primitively represented odd positive integers up to  600 and greater than 1

           7 = 7
          17 = 17
          23 = 23
          31 = 31
          41 = 41
          47 = 47
          49 = 7^2
          71 = 71
          73 = 73
          79 = 79
          89 = 89
          97 = 97
         103 = 103
         113 = 113
         119 = 7 * 17
         127 = 127
         137 = 137
         151 = 151
         161 = 7 * 23
         167 = 167
         191 = 191
         193 = 193
         199 = 199
         217 = 7 * 31
         223 = 223
         233 = 233
         239 = 239
         241 = 241
         257 = 257
         263 = 263
         271 = 271
         281 = 281
         287 = 7 * 41
         289 = 17^2
         311 = 311
         313 = 313
         329 = 7 * 47
         337 = 337
         343 = 7^3
         353 = 353
         359 = 359
         367 = 367
         383 = 383
         391 = 17 * 23
         401 = 401
         409 = 409
         431 = 431
         433 = 433
         439 = 439
         449 = 449
         457 = 457
         463 = 463
         479 = 479
         487 = 487
         497 = 7 * 71
         503 = 503
         511 = 7 * 73
         521 = 521
         527 = 17 * 31
         529 = 23^2
         553 = 7 * 79
         569 = 569
         577 = 577
         593 = 593
         599 = 599


 Primitively represented odd positive integers up to  600 and greater than 1

           1           0          -2   original form 
0
On

Are there some available computational results much beyond $c≤100$ that would confirm intuition that really $a+b$ is almost-always a prime number or this is just some instance of the rule that this is a small sample so it is not quite unusual to have this high percentage of primes?

IMO, it's just because you are using small Pythagorean triples only.

I've conducted some tests for larger primitive triples around$^3$ $c_0=10^{50}$. Let's call a triple $(a,b,c)$ "prime" iff $c\in\Bbb P$. For example, $(3,4,5)$ is a prime triple whereas $(16, 63, 65)$ is not because $65=5\cdot13$.

For the prime triples in $c_0-10^6\cdots c_0+10^6$:

  • From the 8770 prime$^1$ triples $(a,b,c)$ with $|c-10^{50}|\leqslant 10^6$, $$\text{For 291 such triples there is }a+b\in\Bbb P.\text{ This is }291 / 8770 = 3.3\%.$$

For generic primitive triples, such computations are less inconvenient because you have to factor $c\approx c_0$, and for that reason I used the smaller interval $10^{50}\pm10^5$.

  • From the 4544 primitive triples with $|c-10^{50}|\leqslant 10^5$, $$\text{For 128 such triples there is }a+b\in\Bbb P.\text{ This is }128 / 4544 = 2.8\%.$$

I am not familiar with statistics and to tell whether this is statistically significant. Of course also non-prime triples contribute to $a+b\in\Bbb P$.

Example:

Three triples are contributed$^2$ by $ c=10^{50}+3549 = \small 34457 \cdot 38411348312521 \cdot 3467788412123489 \cdot 21787650199356253$:$\def\Im{\mathfrak{Im}} \def\Re{\mathfrak{Re}}$ \begin{array}{r|c|c} \hfill z \stackrel\sim= \sqrt{a+ib\,} \hfill & c & a+b \in\Bbb P\\ \hline \small 1296976664481873740241045 + 9915535867102164494675782\,i & 10^{50}+3549 & \\ \small 2080508524790029291482210 + 9781180106627012523222107\,i & 10^{50}+3549 & \\ \small 2624897991498247705333205 + 9649347674025869875255782\,i & 10^{50}+3549 & \\ \small 3132759182644749181744955 + 9496621499436260202476718\,i & 10^{50}+3549 & \\ \small 3224036380807234324896507 + 9466022893234063478352050\,i & 10^{50}+3549 & * \\ \small 6117622915805371444867450 + 7910416541498493375147243\,i & 10^{50}+3549 & * \\ \small 6550934381660341323983205 + 7555478722568176319806718\,i & 10^{50}+3549 & * \\ \small 7011237840726321813081643 + 7130395777288053485323290\,i & 10^{50}+3549 & \\ \end{array} In order to not clutter up your screens, I am using a notation of triples as a complex number $z=x+iy$. You'll get a triple $(a,b,c)$ by taking \begin{align} a &= |\Re(z^2)| = |x^2-y^2| \\ b &= |\Im(z^2)| = |2xy| \\ c &= |z|^2 = x^2+y^2 \\ \end{align} This is not exactly the same $z$ you get from taking a square root of $a+ib$ because I canonicalized $z$ so that $0\leqslant \Re(z)\leqslant \Im(z)$, indicated by $z\stackrel\sim=\sqrt{a+ib\,}$. This means you might need to swap real and imaginary part and / or to take absolute values, but for Pythagorean triples that does not matter.


$^1$This is exactly the number of primes that are 1 mod 4 in that interval, i.e. $$8770 = \#(\Bbb P\cap(1+4\Bbb Z)\cap[10^{50}-1\,000\,000, 10^{50}+1\,000\,000])$$

$^2$An integer $n$ yields primitive triples iff it only has prime divisors that are 1 mod 4. If $m$ is the number of such divisors (without multiplicity), then $n$ contributes $2^{m-1}$ primitive triples. The triple is prime iff $n$ is prime. Because $10^{50}+3549$ has 4 distinct such prime divisors, it generates 8 primitive Pythagorean triples.

$^3$ There is nothing special about $10^{50}$ except that it is conveniently written down. Similar computations for other $c_0$'s show similar results.

0
On

I belive the leg-sums are the same "set" as leg-differences except that the difference-set also contains $P^0=1$.

What you have is the set of prime power products where $\quad p_n\equiv\pm 1 \pmod 8$.

The value $49=7^2$ and $\space119=7\cdot 17$

Under $100$, $|A-B|\in \big\{1,7, 17, 23, 31, 41, 47, 49, 71, 73, 79, 89, 97\big\}$.

You can build a sum-set to confirm or disprove this.