# Sum of the inverse squares of the hypotenuse of Pythagorean triangles

What is the sum of the series

$$S = \frac{1}{5^2} + \frac{1}{13^2} + \frac{1}{17^2} + \frac{1}{25^2} + \frac{1}{29^2} + \frac{1}{37^2} + \cdots$$

where the sum is taken over all hypotenuse of primitive Pythagorean triangles.

By numerical computation, I found the sum to be $$0.056840308812554488$$ correct to $$18$$ decimal places. I would like to know if this sum has a closed form.

Using the general formula for primitive Pythagorean triangles, $$S = \sum_{r>s\ge 1, \\ \gcd(r,s)= 1}\frac{1}{(r^2 + s^2)^2}$$

Trivially, for all primitive and non primitive Pythagorean triangles, the sum will be $$\zeta(2) = \pi^2/6$$ times the corresponding sum for primitive Pythagorean triangles which turn out to be about $$0.09349856033594433852$$.

Motivation: We have equated the sum of the square of the sides of a right triangle to the square of the hypotenuse, so I was curious to know what the sum of the reciprocal of the square of the hypotenuse would be. Also since $$\zeta(2)$$ converges, and the density of hypotenuse is smaller than that of natural numbers, this sum must trivially converge.

• @MartinR This is slightly different from the series in the link because for primitive Pythagorean triplets, $\gcd(r,s)=1$ and exactly one of them must be even but in the series in the link, these restrictions are relaxed. – Nilotpal Kanti Sinha Oct 22 '19 at 20:25
• One idea that treats $\mathrm{gcd}(r,s)=1$ is that considering $\sum_{d=1}^{\infty}$ with inner sum is $\sum_{\mathrm{gcd}(r,s)=d}$. – Sungjin Kim Oct 23 '19 at 3:28
• In a right triangle with hypotenuse $h$, and other two sides $a, b$, with $a < b$ wlog; the Altitude $H$ is found by composing $H^{-2} = a^{-2}+b^{-2}$. – higgs Oct 23 '19 at 13:58
• Your formula for $S$ allows $r=3$, $s=1$, so $10^{-2}$ should show up in the sum. – Gerry Myerson Nov 10 '19 at 9:46

Let us use the notations from

http://mathworld.wolfram.com/DoubleSeries.html

We fix a positive definite binary quadratic form $$q$$ given by $$q(m,n)=am^2+bmn+cn^2$$, $$a,b,c$$ integers. We use sumations over the index set $$J=\Bbb Z\times\Bbb Z-\{(0,0)\}\ .$$ We define \begin{aligned} S(q;s) = S(a,b,c;s) &=\sum_{(m,n)\in J} q(m,n)^{-s}=\sum_{(m,n)\in J} (am^2+bmn+cn^2)^{-s}\ ,\\ S_1(q;s) = S_1(a,b,c;s) &=\sum_{(m,n)\in J} \color{blue}{(-1)^m}\; q(m,n)^{-s}\ ,\\ S_2(q;s) = S_2(a,b,c;s) &=\sum_{(m,n)\in J} \color{blue}{(-1)^n}\; q(m,n)^{-s}\ ,\\ S_{12}(q;s) = S_{12}(a,b,c;s) &=\sum_{(m,n)\in J}\color{blue}{(-1)^{m+n}}\; q(m,n)^{-s}\ . \end{aligned} The last three sums are "twisted versions" of the first sum, the "twist" occurs by using a character for the first parameter, for the second one, for both. In our case, $$q(m,n)=m^2 +n^2$$, and $$(a,b,c)=(1,0,1)$$, we have a symmetric case (w.r.t. the exchange $$a\leftrightarrow c$$).

We will drop $$q$$ below from notations in $$S_?(q,s)$$, since we use only the above quadratic form $$q$$. I decided during the edit operation that should bring us quick to numbers we can compute that it is better for the check to introduce the versions $$S^+$$ for all sums, where the plus index indicates a further restriction to $$(m,n)\in J$$ with $$(+)\qquad m,n>0\ .$$

From loc. cit. we extract the following relations: \begin{aligned} S(s) &= \sum_{(m,n)\in J}(m^2+n^2)^{-s} \\ &= 4\beta(s)\;\zeta(s)\ ,\\ %S_1(s) =S_2(s) &= \sum_{(m,n)\in J}(-1)^m(m^2+n^2)^{-s} =\dots %= 2^{-s}b_2(2s) = -2^{-s}\cdot 4\beta(2s)\; \eta(2s) %\ , %\\ S_{12}(s) &= \sum_{(m,n)\in J}(-1)^{m+n}(m^2+n^2)^{-s} \\ &= -4 \beta(s) \;\eta(s)=-4\beta(s) \;(1-2^{1-s})\; \zeta(s)\ . \\[2mm] &\qquad\text{ Then the plus versions are:} \\[3mm] S^+(s) &= \beta(s)\;\zeta(s) - \zeta(2s)\ , \\ -S_{12}^+(s) &= \beta(s)\;\eta(s) - \eta(2s) \\ &= \beta(s)\;(1-2^{1-s})\zeta(s) - (1-2^{1-2s})\zeta(2s)\ , \\ &\qquad \text{ which gives} \\ S^+(s)-S_{12}^+(s) &=2\beta(s)\;(1-2^{-s})\zeta(s) - 2(1-2^{-2s})\zeta(2s)\ . \end{aligned}

Now let us search for a linear combination of the above sums that correspond to summing $$q(m,n)^{-s}$$ over the set of $$K$$ of all $$(m,n)$$ with positive (components with) different parity. This is $$\frac 12(\ S^+(s)-S^+_{12}(s)\ )\ .$$ So far can we write: \begin{aligned} &\beta(s)\;(1-2^{-s})\zeta(s) - (1-2^{-2s})\zeta(2s) \\ &\qquad=\frac 12(\ S^+(s)-S^+_{12}(s)\ ) \\ &\qquad=\sum_{\substack{(m,n)\in K\\m,n> 0}} q(m,n)^{-s}\\ &\qquad=2\sum_{\substack{(m,n)\in K\\m>n> 0}} q(m,n)^{-s}\\ &\qquad=2\sum_{\substack{(m,n)\in K\\m>n> 0\\ d=(m,n)\text{ odd}}} q(m,n)^{-s}\qquad\text{ and with }M=m/d,\ N=n/d\\ &\qquad=2\sum_{d>0\text{ odd}}d^{-2s} \sum_{\substack{(M,N)\in K\\M>N> 0\\ (M,N)=1}} q(M,N)^{-s}\\ &\qquad= 2(1-2^{-2s})\; \zeta(2s)\; \color{blue}{ \sum_{\substack{(M,N)\in K\\M>N> 0\\ (M,N)=1}} q(M,N)^{-s} } \ . \end{aligned} The isolated sum in the last expresson is the sum we need, let us take it for $$s=2$$.

The value we obtain is: $$\color{brown}{ \frac{\beta(2)\;\zeta(2)}{2(1+2^{-2})\zeta(4)} -\frac 12\ = \frac{6C}{\pi^2} - \frac 12.}$$

$$\color{brown}{ \frac{\beta(2)\zeta(2)}{2(1+2^{-2})\zeta(4)} - \frac{1}{2} = \frac{6C}{\pi^2} - \frac 1 2.}$$

where $$C$$ is the Catalan constant. Numerically:

sage: E = catalan * zeta(2) / 2 / (1+2^-2) / zeta(4) - 1/2
sage: E.n()
0.0568403090661582

• Where does the factor of $8$ come from? I would have expected that forcing $m>n$ would produce a factor of $2$. – Angela Richardson Oct 23 '19 at 13:54
• @AngelaRichardson The sums that have the formulas in the linked mathworld.wolfram.com/DoubleSeries.html are built over the set $J$, which is the lattice $\Bbb Z^2$ with origin removed. We associate terms to this lattice points, then want to get rid of the terms with same parity. This is done, we have a new index set $K$ for the terms, and $K$ has points in all four quadrants. (We eliminate at some point the contributions from the axes.) Taking $1/4$ of the sum restricts the sum to one of the quadrants, the OP wants moreover only the half. (Say, the terms for $m>n>0$.) So $1/8$... – dan_fulea Oct 23 '19 at 15:04
• Thanks. I forgot that $m,n$ could be negative. – Angela Richardson Oct 23 '19 at 15:07
• @AngelaRichardson Thanks for the question / comment, it turns out that it is simpler in the presentation to restrict as soon as possible to pairs $(m,n)$ with $m,n>0$, i have changed the exposition so that the factor eight no longer appears. (It is also simpler to present things in this fashion.) For readers that have not seen the first version of the answer, the above comments are obsolete now. (But they helped me to present things better.) – dan_fulea Oct 23 '19 at 21:11