Sum of two squares

Assume that p,q,r are natural numbers satisfy
p^2+q^2=r^2
Prove that if p is a prime number then r-q=1

2 Likes

p^2+q^2=r^2 =>p^2=r^2-q^2=(r-q)(r+q)
p^2=(r-q)(r+q),Because r^2=p^2+q^2
=>r^2>q^2
=>r>q, r-q>0
r+q>r-q so both r-q,r+q are positive
Since p is prime the only positive divisors of p^2 are 1,p,p^2
Case1: r-q=r+q=p but this is impossible since r+q>r-q.
Case2: r-q=1,r+q=p^2.
So we get that if p^2+q^2=r^2,p is prime then r-q=1

2 Likes