Why does the hypotenuse differ by one from the non-prime side? I have searched the site quickly and have not come across this exact problem. I have noticed that a Pythagorean triple (a,b,c) where c is the hypotenuse and a is prime, is always of the form (a,b,b+1): The hypotenuse is one more than the non-prime side. Why is this so?
 A: You don't need the formulas for generating Pythagorean triples.  If you have $a^2=c^2-b^2=(c+b)(c-b)$ with $a$ prime, the only way to factor $a^2$ with distinct factors is $a^2 \cdot 1$, so $c-b=1, c+b=a^2$  
Added:  this shows how to find all the triangles with a side of $a$, prime or not.  You factor $a^2$ into factors which are different and the same parity.  The same parity requirement come from the fact that you need $b$ and $c$ to be integers.  So if $a=12$, we can write $144= 2 \cdot 72, 4\cdot 36, 6\cdot 24, 8 \cdot 18$, but we can't write $144=1 \cdot 144, 9\cdot 16, 12 \cdot 12$.  We then get triangles $(12,35,37),(12,16,20),(12,5,13)$
A: The only possibility is, with positive integers $r > s,$ 
$$ a = r^2 - s^2,  $$
$$ b = 2rs,  $$
$$ c = r^2 + s^2.  $$
In order to have $a= (r-s)(r+s)$ prime, we must have $(r-s) = 1,$ or 
$$  r=s+1. $$ So, in fact, we have
$$ a = 2s+1,  $$
$$ b = 2s^2 + 2 s,   $$
$$ c = 2s^2 + 2 s + 1.      $$
There you go. 
A: All Pythagorean triples are of the form $k(p^2-q^2), 2kpq, k(p^2+q^2)$ where $p$ and $q$ are positive, relatively prime and of opposite parity. Since $a$ is to be prime, it must be $k(p^2-q^2)$, not $2kpq$; this forces $p^2-q^2=1$, which is impossible, or $k=1$ and $p^2-q^2$ is a prime. So the triangle is of the form $$a=p^2-q^2,\quad b=2pq,\quad c=p^2+q^2.$$ But then
$$a = p^2-q^2 = (p-q)(p+q),$$
so that since $a$ is prime we must have $p-q=1$. But then
$$c-b = p^2 + q^2 - 2pq = (p-q)^2 = 1.$$
A: After reading the great answers, just wanted to add one easy-to-follow rule that makes possible to build a Pythagorean triple $(a,b,b+1$) starting with any odd number $a \gt 3$, as follows:
$a$ is the original odd number
$b=\frac{a^2-1}{2}$
$c=b+1$
As that works for any odd number greater than $3$, the prime numbers greater than $3$ are also able to be found in a triplet of that shape.
A: The subset of triples where the GCD of A,B,C is an odd square and where $C-B=(2n-1)^2$ is also a group of distinct sets of triples as shown below.
$$\begin{array}{c|c|c|c|c|} 
 \text{$Set_n$}& \text{$Triple_1$} & \text{$Triple_2$} & \text{$Triple_3$} & \text{$Triple_4$}\\ \hline
\text{$Set_1$} & 3,4,5 & 5,12,13& 7,24,25& 9,40,41\\ \hline
\text{$Set_2$} & 15,8,17 & 21,20,29 &27,36,45 &33,56,65\\ \hline
\text{$Set_3$} & 35,12,37 & 45,28,53 &55,48,73 &65,72,97 \\ \hline
\text{$Set_{25}$} &2499,100,2501 &2597,204,2605  &2695,312,2713 &2793,424,2825\\ \hline
\end{array}$$
Normally, triples area generated using Euclid's formula where
$$A=m^2-n^2\quad B=2mn\quad C=m^2+n^2$$ 
We can get the subset if, instead of using $(m,n)$, we use $(2-1+n,n)$ which expands to
$$A=(2m-1)^2+2(2m-1)n\qquad B=2(2m-1)+2n^2\qquad C=(2m-1)^2+2(2m-1)n+2n^2$$
$Set_1$ contains $only$ primitives and $only$ in $Set_1$ does $C-B=1$
If we let $m=1 (Set_1)$, the formula reduces to $A=2n+1\quad B=2n^2+2n\quad C=2n^2+2n+1$
We can see by inspection that the diffrerence between $B$ and $C$ is always $1$.
