A084648 of the OEIS contains all numbers where the square of the number can be decomposed exactly in four different ways in a sum of two squares of integers. For example 65 is a term of A084648 because: $$65^2 = 16^2+63^2 = 25^2+60^2 = 33^2+56^2 = 39^2+52^2$$ I was searching for such a number where all 8 integers that form the 4 sums are also terms of A084648. I nearly found one: $$49097^2 = 4695^2 + 48872^2 = 7072^2 + 48585^2 = 30305^2 + 38628^2 = 33860^2 + 35553^2$$ The squares of the first 7 numbers indeed can be decomposed exactly 4 times, but unfortunately 35553 is the hypotenuse of only one integer-sided triangle. My Python code gives overflow errors when I try larger numbers. Any suggestion?
2026-03-29 07:29:55.1774769395
On
Hypotenuses for which there exist exactly 4 distinct integer triangles with an extra constraint
79 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
5
On
Have this: $$453041^2 = 38991^2+451360^2 = 138320^2+431409^2 =\\ = 250991^2+377160^2 = 282520^2+354159^2$$ (Yes this is the smallest example.)
I used Mathematica and its built-in functions for decomposing integers in sums of two squares, which is probably faster than we can do in Python.
Also, I only checked the numbers which are the products of two distinct primes of the form $4n+1$.
There are $\space 2^{p-1}$ primitive triples for every valid $C$-value where $\space n\space$ is the number of distinct prime factors of $\space C\space$ that are also valid $C$-values. For example, $\space 65=5\times13\space$ so there are $\space2^{2-1}=2\space$ primitive triples where $\space C=65.\quad $ There are also $\quad 5\times(5,12,13)\space\text{and}\space 13\times(3,4,5)\quad$ where $\space C=65.\quad $ Note: all $\space C$-values take the form $\space4n+1\space$ but not all $\space4n+1\space$ values are valid.
You can make Python use arbitrary precision as shown here but perhaps you do not need to. The following will let you find candidates fast without testing the square sums.
There is a way to use Euclid's formula to find primitives, doubles, square multiples, and doubles of square multiples of primitives but a faster way is by using a formula I developed in $2009$ that generates/finds only and all triples where $\space GCD(A,B,C)\space$ is and odd square.
\begin{align*} A&=(2n-1)^2 &+2(2n-1)k&\\ B&=&2(2n-1)k&\quad +2k^2\\ C&=(2n-1)^2&+2(2n-1)k&\quad +2k^2\\ \end{align*}
To find triples for a give hypotenuse, we begin by solving the $\space C$-function for $\space k \space$ and testing a defined range of $n$-values to see which yield integers.
$$ C=(2n-1)^2+2(2n-1)k+2k^2\\ \implies k=\frac{\sqrt{2C-(2n-1)^2}-(2n-1)}{2}\\ \text{ for }1\le n \le\biggl\lfloor\frac{\sqrt{C-1}}{2}\biggr\rfloor\\$$ $$C=65\implies 1\le n\le\biggl\lfloor\frac{\sqrt{65-1}}{2}\biggr\rfloor= 4\\ \text{and we find}\quad n\in\{2,4\} \implies k\in\{4,1\} $$ $$ F(2,4)=(33,56,65)\quad F(4,1)=(63,16,65)$$ Doing the same for $\space C$-values $5$ and $!3$ yields $\space(3,4,5)\space$ and $\space (5,12,13)\space $ which, multiplied by the cofactors of $ 65$, also yields $\space C=65.$
Let's take one of your terms where $\space 7072 =2^5\times 13\times 17.\quad$ Since no power of $\space 2\space$ is a valid $\space C$-value, the $\space 2^{2-1}$ immediate multiples of primitives we have are
$$32\times (21,220,221)\qquad 32\times (171,140,221)$$
where $\quad 221=13\times17\quad $ and the other two are $$2^5\times 13\times (15,8,17)\qquad 2^5\times 17\times (5,12,13)$$
I can only imagine the complexity of the code needed to test so many things in nested loops but, if such a set of terms exists within say $\space 8\space$ digits, this will allow you to find them.