I have been finding a lot of numbers that satisfy the equation a^2 +b^2 = c^2 +d^2, and I was wondering if there was a way to generate a, b, c, and d, using 2 or 3 starting numbers like m or n. (Basically like how you would generate Pythagorean Triples, just with a twist.) Any help is good help. Thank you for reading.
1 Answers
There are an infinite number of these meeting the trivial criteria of $a^2+b^2=x^2+1^2$ using $\quad A=4n^2-1\quad B=4n\quad C=4n^2+1.$
Also, using Euclid's formula, $A=m^2-1^2\quad B=2mk\quad C=m^2+k^2$ We can solve the $C$-function for $k$ and, for each $C$-value, try a defined range of $n$-values to see which, if any, yield integers.
Many but not all numbers of the form $4n+1$ are valid $C$-values and, for those that are, there are $2^{n-1}$ primitive $a^2+b^2=c^2$ combinations where $n$ is the number of prime factors of $C$. Let's begin.
\begin{equation} C=m^2+k^2\implies k=\sqrt{C-m^2}\\ \text{for}\quad \bigg\lfloor\frac{ 1+\sqrt{2C-1}}{2}\bigg\rfloor \le m \le \lfloor\sqrt{C-1}\rfloor \end{equation} The lower limit ensures $m>k$ and the upper limit ensures $k\in\mathbb{N}$. $$C=65\implies \bigg\lfloor\frac{ 1+\sqrt{130-1}}{2}\bigg\rfloor=6 \le m \le \lfloor\sqrt{65-1}\rfloor=8\\ \land \quad m\in\{7,8\}\Rightarrow k\in\{4,1\}\\$$ $$F(7,4)=(33,56,65)\qquad \qquad F(8,1)=(63,16,65) $$
Here, because $65$ has two prime factors, we have two primitive Pythagorean triples that match. This gives us $\qquad 33^2+56^2=63^2+16^2$
Another example is $C=1105=5\cdot13\cdot17$, and $2^{3-1}=4$ so we find
$$47^2+1104^2= 817^2+744^2= 943^2+576^2= 1073^2+264^2$$

- 6,338