Pythagorean triples with the same c value $a^2 + b^2 = c^2$ 
There are, Primitive Pythagorean Triples, that share the same c value. For example, 
$63^2 + 16^2 = 65^2$ and $33 ^2 + 56^2 = 65^2$.
I have been trying to figure out why the following theorem for finding such triples works.
Take any set of primes. Ex: $5,13,17$. 
Now take their product, $1052$, this is the new $c^2$ value. You can express that $c^2$ value as a triple by factoring the product of primes as Gaussian Integers:
$(2-i)(2+i)(3+2i)(3-2i)(4+i)(4-i)$
Now if you take three of those Gaussian Integers and solve for their product:
ex, $(2+i)(3+2i)(4+i) = 9+32i$ and you have found an $a$ value $9$ and a $b$ value $32$ that works in the theorem. $9^2 + 32^2 = 1105$
You can continue with this:
$(2-i)(3+2i)(4+i) = a + bi$
$(2+i)(3-2i)(4+i) = a + bi$
$(2+i)(3+2i)(4-i) = a + bi$
In fact, the number of triples with this method is $2^{||p|| - 1}$ where $||p||$ is the number of primes used.
Can someone please explain why this method of finding these "c stuck triples" works the way it does?
EDIT: It appears that you cannot take any prime, $p$ but rather must use primes congruent to $1mod4$ according to Fermat's theorem on sums.
 A: The system of equations:   
$$\left\{\begin{aligned}&x^2+y^2=z^2\\&q^2+t^2=z^2\end{aligned}\right.$$
Formulas you can write a lot, but will be limited to this. Will make a replacement.  
$$a=p^2+s^2-k^2$$
$$b=p^2+s^2+k^2-2pk-2ks$$
$$c=p^2+k^2-s^2+2ps-2kp$$
$$r=s^2+k^2-p^2+2ps-2ks$$ 
The solution then is.  
$$x=2ab$$  
$$y=a^2-b^2$$  
$$q=2cr$$  
$$t=c^2-r^2$$  
$$z=a^2+b^2$$
$p,s,k$ - integers.
A: 1) $(a + bi)(a - bi) = a^2 + b^2$ always.
2) $(a + bi)(c + di)(e + fi) = g + hi \ne (a + bi)(c + di)(e - fi) = j + ki$
yet $(a - bi)(c - di)(e - fi) = g - hi \ne (a - bi)(c - di)(e + fi) = j - ki$
so 
3) $(a + bi)(c + di)(e + fi)(a - bi)(c - di)(e - fi) = (g+hi)(g - hi) = g^2 + h^2 =K$
and
4) $(a + bi)(c + di)(e - fi)(a - bi)(c - di)(e + fi) = (j+ki)(j - ki) = j^2 + k^2 = pqr$
So $pqr = g^2 + h^2 = j^2 + k^2$.
You do have to choose primes that a gaussian factorable which seems to me like begging the question.
A: Write the Pythagorean equation $a^2 + b^2 = c^2$  under the form $N(z) =c^2$ , where $z = a + ib$ in $Z[i]$ and N denotes the norm map of $Q(i)/Q$ . Since the norm is multiplicative, it is sufficient to solve the same problem where c is replaced by a prime p factor of c. In your example(s), you take such a p to be congruent to 1 mod 4, so that it is totally decomposed in $Z[i]$, and the usual proof shows that $p$ (hence $p^2$) is indeed a norm.  Process as you did, and we are through.
Let me propose another way to find all the "$c$ stuck triples", as you call them, by exploiting more heartily the arithmetic of the Gaussian integers. The parametrization of the integer triples verifying  $a^2 + b^2 = c^2$  in $Z$ is classically known, but here is a « Galois solution ». Let us begin with $N(z) = 1$,  with $z$ in $Q(i)$ .  An element $X + iY$ in $Q(i)$ has norm 1 iff it has the form $(x +iy)/(x-iy)$ (Hilbert 90 !), equivalently iff $X = (x^2 - y^2)/(x^2 + y^2) , Y = 2xy/(x^2 + y^2)$. Since these expressions are homogeneous in x, y, we can take x, y in $Z$. Coming back to the original Pythagorean equation, we get the usual parametrization of the Pythagorean triples : $a = m^2 – n^2 , b = 2mn , c = m^2 + n^2 $. If we fix c, all the « c stuck triples » (a,b,c) will be given as above, starting from (m,n) such that $c = m^2 + n^2$ . More precisely, the quotient $(x+iy)/(x-iy)$ as above, with $x^2 + y^2 = c$, will yield all the  "c stuck triples". These are parametrized as follows : $x + iy = t. (m + in)$, with $N(t) = 1$. 
EDIT Particular case : if $t$ is in $Z [i]$, then $t$ is a unit (invertible), hence a power of $i$, and we recover the « manipulations » in your example(s). General case : as before, $t = \bar s /s$, with $s$ in $Z[i]$, hence $s. (x + iy) = \bar s . (m + in)  (*)$, which means that $s$ divides $\bar s . (m + in)$ in $Z[i]$. Let us consider the prime factors $\pi$ of $s$. Denoting by $p$ the prime number under $\pi$, ramification theory in quadratic fields distinguishes three cases : (1) $p$ is inert ; (2) $p$ is totally ramified ; (3) $p$ is totally split (this corresponds to $p\equiv 1\pmod 4$). In the first two cases, there is only one prime ideal over $p$, hence $\pi$ and $\bar \pi$ differ by a unit, and we can simplify in $s$ and $\bar s$ . In the third case, $\pi $ and $\bar \pi$ are coprime, hence $\pi$ divides $(m + in)$ (and $p$ divides $c$). Conversely, taking for $s$ such a $\pi$, we get (x + iy) as in (*) . Conclusion : if no prime factor of $c$ is congruent to 1 mod 4, we are in the particular case ; if there is at least one prime factor of $c$ congruent to 1 mod 4, the solutions are more complicated. 
