Why does the hypotenuse differ by one from the non-prime side?

176 Views Asked by At

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?

4

There are 4 best solutions below

2
On

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.

2
On

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.$$

0
On

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)$

1
On

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.