Determine whether there are any right-angled triangles with integer lengths such that the lengths of both of the sides adjacent to the right angle are primes.
This was the question I was asked by my teacher. My first answer is no, which I still believe is correct, but then she asked me "why?" and I got stumped. My first thought was that Pythagorean triples can be generalized as: $$2k,\quad k^2-1,\quad k^2+1$$ Is this generalization correct? Because, if so, $2k$, for $k > 1$, cannot be a prime as it is divisible by $2$. Even if $k= 1$, there are no Pythagorean integer triples that have $2$.
Also, $k^2-1$ cannot be a prime, for $k > 2$, because it can be factored like this: $(k+1)(k-1)$ Even if $\quad k = 2,\quad 2k = 4,\space k^2-1=3, \space k^2+1 = 5.\quad$ Thus, the two sides adjacent to the right angle would be 3 and 4, one of which (4) is not prime.
Only $k^2+1$ could be prime, proving that either a or b can be prime, but both can't.
Is this proof correct? If the generalization is wrong, the proof is also flawed. Thanks.
If $a=2$ and $b\ge 2$ is prime, we need an integer $c$ with $c^2=b^2+2^2$. As $(b+1)^2=b^2+2b+1>b^2+4$, we’d need $b^2<c^2<(b+1)^2$, which is impossible.
Hence we must have odd sides $a=2r+1$ and $b=2s+1$, so $$\tag1c^2=(2r+1)^2+(2s+1)^2 =4(r^2+r+s^2+s)+2,$$ a number that is even, but not a multiple of $4$. If $c$ is odd, then $c^2$ is odd; and if $c$ is even, $c^2$ is a multiple of $4$. Neither of these options is compatible with $(1)$, hence no solution exists.