Density of Pythagorean triples

792 Views Asked by At

We define a Pythagorean triple as a triple $<a,b,c>$ such that $a,b,c\in \mathbb N$ and $a^2+b^2=c^2$.

In order to avoid duplicates, we say that a triple $<a,b,c>$ is legit iff $b>a$.


Let $\mathcal P$ be the set of all legit Pythagorean triples.

We define $$L_{PT}^N=\{<a,b,c> | <a,b,c> \in \mathcal P\wedge b\leq N\}$$

(If it's more convinient we can define it for $b^2\leq N$, $c\leq N$ or $c^2\leq N$).

What is the density of $|L_{PT}^N|$ as a function of $N$? e.g. is $|L_{PT}^N|=\Theta(N^2)?\Theta(N)?$


We say that a triple $<a,b,c>$ is minimal if $gcd(a,b,c)=1$. Let $\mathcal P_M$ be the set of all legit, minimal triples.

Let $$L_{MPT}^N=\{<a,b,c> | <a,b,c> \in \mathcal P_M\wedge b\leq N\}$$

What is the density of $|L_{MPT}^N|$ as a function of $N$? e.g. is $|L_{MPT}^N|=\Theta(N)?$

4

There are 4 best solutions below

1
On

If you ask about NumOfTriples that is a number of Pythagorean triples such that b>a and gcd(a, b,c)=1 with cNumOfTriples/n~0.16. This ratio starts at 0 (no triples with c<4), reaches 0.166 at first triple, Fluctuates within several % of it's value and settles around n~100. For the range 40000-100000.

Values NumOfTriples/n for_even_C for_odd_C
Average 0.159143303 0.0795567596 0.0795865435
Stdev 0.000074771 4.54997573791607E-005 6.54951966971986E-005

The distribution is surprisingly uniform. Even C are statistically (albeit barely) less common than odd C.

0
On

The are primitive Pythagorean triples for every $A=(2x+1), x\in\mathbb{N}$. This could mean that the density is $50\%$ but "multiple primitive triples" increase with the compositeness of $A$. . For example, using Euclid's formula

$$A=m^2-k^2,\quad B=2mk,\quad C=m^2+k^2$$

\begin{equation} f(4,1)=(15,8,17)\qquad f(8,7)=(15,112,113)\\ f(5,2)=(21,20,29)\qquad f(11,10)=(21,220,221)\\ f(7,4)=(33,56,65)\qquad f(17,16)=(33,544,545)\\ f(6,1)=(35,12,37)\qquad f(18,17)=(35,612,613)\\ f(8,5)=(39,80,89)\qquad f(20,19)=(39,760,761)\\ \vdots\\ f(41,24)=(1105,1968,2257)\\ f(49,36)=(1105,3528,3697)\\ f(113,108)=(1105,24408,24433)\\ f(553,552)=(1105,610512,610513 \end{equation}

The number of primitives for a given $A$-value is $2^{n-1}$ where $n$ is the number of distinct prime factors of $A$. For example $ 15=3\cdot5\rightarrow 2^1=2\qquad 1105=5\cdot13\cdot17\rightarrow2^2=4.\quad$ Some $A$-values will have more than this but the extras will not be primitive. This means that the density could increase arbitrarily as $N\rightarrow\infty$. A complete answer would include analysis of composite numbers as $N$ increases.

There are primitive triples for every $B=4x, x\in\mathbb{N}$ and there are multiples for composites the same way there are for $A$-values. These occur more often for $B$ values than with $A$-values so the number of multiples might approach the same value with larger $N$.

\begin{equation} f(3,2)=(5,12,13)\qquad f(6,1)=(35,12,37)\\ f(5,2)=(21,20,29)\qquad f(10,1)=(99,20,101)\\ f(7,2)=(45,28,53)\qquad f(14,1)=(195,28,197)\\ f(4,4)=(0,32,32)\qquad f(16,1)=(255,32,257)\\ \vdots\\ f(6,5)=(11,60,61)\quad f(10,3)=(91,60,109)\\ f(15,2)=(221,60,229)\quad f(30,1)=(899,60,901) \end{equation}

All $C$-values must of be of the form $(4x+1), x\in\mathbb{N}$ but not all such values are valid. The appear to be valid about $2/3$ of the time but that is just a casual observation of a limited data set. In any case, there are multiples for composite $C$-values the same way there are for $A$-values and $B$-values.

Since all of these have what appears to have the same frequency and number of multiples for composites in the long run, the density might be represented by the discussion of $A$-values alone.

2
On

It was proved by Lehmer that the number of primitive triples with hypotenuse less than $x$ is asymptotic to $$ \frac{x}{2\pi} \approx 0.15915494309x $$

0
On

If $R$ is the ratio of primitive Pythagorean triples for $C\le N,\space$ then it approaches $0.1591549430919\cdots ,$ as shown in the chart below where the x-axis is a power of $10.$

enter image description here