Let $a_k<b_k<c_k$ be the $k$-th primitive Pythagorean triplet in ascending order of the hypotenuse $c_k$. Define

$$ l = \frac{b_1 + b_2 + b_3 + \cdots + b_k}{c_1 + c_2 + c_3 + \cdots + c_k}, \text{ } s = \frac{a_1 + a_2 + a_3 + \cdots + a_k}{c_1 + c_2 + c_3 + \cdots + c_k} $$

Question: What is the limiting value of $l$ and $s$?

The difference between this question and the related question: Part 2: Does the arithmetic mean of sides right triangles to the mean of their hypotenuse converge? is that here the triangles are in sequenced in ascending order of the hypotenuse $c_k$ where as in the related question, they are sequenced in ascending order of $r$ and $s$, and depending on the choice of sequencing, the limiting value differs.

SageMath Code

c  = 1
sa = 1
sb = 1
sc = 1
f  = 0
sx = 0
while(c <= 10^20):
    a = c - 1
    b = 3
    while(a > b):
        b = (c^2 - a^2)^0.5
        if(b%1 == 0):
            if(b <= a):
                if(gcd(a,b) == 1):
                    f  = f + 1
                    sa = sa + a
                    sb = sb + b
                    sc = sc + c
                    sx = sx + 1/c.n()
                    print(f,c, sa/sc.n(),sb/sc.n(),sx)
        a = a - 1
    c = c + 1
  • 1
    $\begingroup$ You should mention that all values except $l,s$ are integer numbers. And so pay attention to your code b = (c^2 - a^2)^0.5, of that ^0.5 $\endgroup$ – Ripi2 Oct 25 '19 at 16:57

Quantities $x=a/c$ and $y=b/c$ are the legs of a pythagorean triangle having unit hypotenuse, hence they are the coordinates of points lying on a unit circle centred at the origin, and $x=\cos\theta$, $y=\sin\theta$ with $\pi/4<\theta<\pi/2$.

It is reasonable to think that, at least in the case of primitive triples, those points are spread evenly on that arc. In that case their average values are: $$ \langle x\rangle={\int_{\pi/4}^{\pi/2}\cos\theta\,d\theta\over\int_{\pi/4}^{\pi/2}d\theta}= {4-2\sqrt2\over\pi}\approx 0.372923, $$ $$ \langle y\rangle={\int_{\pi/4}^{\pi/2}\sin\theta\,d\theta\over\int_{\pi/4}^{\pi/2}d\theta}={2\sqrt2\over\pi}\approx 0.900316. $$ One should then justify that $\langle a\rangle/\langle c\rangle$ and $\langle a/c\rangle$ have the same limiting value, but that also seems very reasonable. I ran a simulation up to $k\approx800000$ and found the encouraging results: $$ s_k\approx0.373,\quad l_k\approx0.900. $$

  • $\begingroup$ Finding a bug in a code can be difficult. It would be easier, in my opinion, if you could share a file with all the triples you found. However, my simulation was made with primitive triples only, while yours involves all triples: I'll try to add non-primitive triples to see if I can reproduce your results. $\endgroup$ – Aretino Oct 25 '19 at 8:24
  • $\begingroup$ My code is still running and I will run it for a few more days. But I have added the code in the post now. $\endgroup$ – Nilotpal Kanti Sinha Oct 25 '19 at 8:39
  • $\begingroup$ Your answer is correct for primitive triplets and agrees with my computations. $\endgroup$ – Nilotpal Kanti Sinha Oct 27 '19 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.