# An interesting question about greatest common divisor (gcd) of three positive integers which form a primitive Pythagorean triple

Suppose $$a$$, $$b$$, and $$c$$ are three distinct integers which share no common divisor. Note that this implies that $$a$$, $$b$$, and $$c$$ are pairwise coprime. If $$a$$,$$b$$, and $$c$$ are a primitive Pythagorean triple satisfying the equation $$a^2 + b^2 = c^2$$ , is it then always true that

$$\gcd ( (a+b) , (a+b-c) ) = 1?$$

Can it be proven that $$\gcd ( (a+b) , (a+b-c) ) = 1$$ invariably ?

Can you find a counterexample where $$\gcd ( (a+b) , (a+b-c) ) \neq 1$$?

We have that $$\gcd(a+b, a+b-c) = \gcd(a+b, -c) = \gcd(a+b, c).$$ Now suppose that $$p$$ is a prime dividing $$\gcd(a+b, c)$$. Because $$a^2 + b^2 = c^2$$, we have that $$p^2$$ also divides $$(a+b)^2 - (a^2 + b^2) = 2ab$$. In particular $$p$$ divides either $$a$$ or $$b$$ (even if $$p=2$$). But this contradicts our assumption.
• You forgot to (explicitly) eliminate the possibility $\,p = 2.\ \$ – Bill Dubuque Aug 23 '19 at 13:26
• @BillDubuque, I don't treat it as a special case; note that $p^2$ divides $2ab$, so even if $p=2$, that still leaves a factor of 2 for $ab$. – Mees de Vries Aug 23 '19 at 13:32
• Yes but the peculiarity for $\,p = 2\,$ deserves explicit mention (else the reader can't know whether or not there is actually a gap in the argument). I'd write "(even if $p = 2$)" – Bill Dubuque Aug 23 '19 at 13:45
Hint $$\ (a\!+\!b, a\!+\!b\!-\!c)= (a\!+\!b,c)\mid (a\!+\!b,\!\!\!\overbrace{c^2}^{a^2\,+\,b^2}\!\!\!)\mid 2(a^2,b^2)\!=\!2,\,$$ but $$c$$ is odd in a PPT
• See also here for a proof that $\,(a\!+\!b,\,a^2\!+\!b^2)\mid 2(a,b)^2\$ and more. – Bill Dubuque Aug 23 '19 at 14:27