All C-values are of the form $4n-1.\quad$ Here is a simple BASIC program that I used to generate the C-values (in my other answer) that have $4$ matching primitive triples each. Sometimes there will be more than $4$ but those extras will be non-primitive. There will always be $2^{n-1}$ primitive triples for a C-value where $n$ is the number or prime factors of C. For instance, $1105=5\times13\times17$ so there are $2^2$ primitives. The number of primitives will be $2^{n-1)$ where $n$ is the number of unique prime factors of C. After the "run", the next section shows which ones produce all primitives. 100 print "input limit"; 110 input l1 120 for n1 = 1 to l1 130 c1=4*n1+1 140 m1=int((1+sqrt(2*c1-1))/2) 150 m2=int(sqrt(c1-1)) 160 c9=0 170 for m0=m1 to m2 180 k0=sqrt(c1-m0^2) 190 if k0=int(k0) 200 c9=c9+1 210 endif 220 next m0 230 if c9=4 240 print c1, 250 endif 310 next n1 Here is a sample run where $l1=3000$ 1105 1625 1885 2125 2405 2465 2665 3145 3445 3485 3625 3965 4225 4505 4625 4745 5125 5185 5365 5785 5945 6205 6305 6409 6565 6625 7085 7225 7345 7565 7585 7625 7685 8177 8245 8585 8845 8905 9061 9125 9265 9605 9685 9805 9945 10205 10585 10865 10985 11125 11245 11285 11645 11713 11765 --- Added: The following C-values have $4$ matching primitive Pythagorean triple each where $$a_1^2+b_1^2=a_2^2+b_2^2=a_3^2+b_3^2=a_4^2+b_4^2=c^2$$ $$1105, 1885, 2405, 2465, 2665, 3145, 3445, 3485, 3965, 4505, 5185, 5365, 5785\\ 5945, 6205, 6305, 6409, 6565, 7085, 7345, 7565, 7585, 7685, 8177, 8245, 8585\\ 8845, 8905, 9061, 9565, 9605, 9685, 9805, 10205, 10585, 10865, 11245 11285\\ 11645, 11713, 11765, 12505, 12545,12665, 12805, 12905, 13345, 13481, 13505\\ 13949, 14065, 14645, 14705, 14885, 14965, 15145, 15385, 15457, 15665, 15805$$ We can find these triple by solving Euclid's formula for $C$ and testing a defined range of m-values to see which, if any, yield integers. $$ \quad A=m^2-k^2,\quad B=2mk,\quad C=m^2+k^2\quad$$ Here is an example using $C=64$ to find two primitive triples. $\qquad 1105$ would have yielded $4$ \begin{equation} C=m^2+k^2\implies k=\sqrt{C-m^2}\\ \text{for}\qquad \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\}\implies k\in\{4,1\}\\$$ $$F(7,4)=(33,56,65)\qquad \qquad F(8,1)=(63,16,65) $$ If we were to use $C=1105$, we would find $$f(24,23)=(47,1104,1105)\quad f(31,12)=(817,744,1105)\\ f(32,9)=(943,576,1105)\quad f(33,4)=(1073,264,1105)$$