If $\gcd(a,b)=1$ then $\gcd(a^2+b^2,a+2ab)=1$ or $5$

725 Views Asked by At

The question is already in the title.

Show that if $\gcd(a,b)=1$ then $\gcd(a^2+b^2,a+2ab)=1$ or $5$.

I saw yesterday this exercise in a book and I tried many things but I managed to show only that if some prime $p$ ($p$ must be $\equiv1\pmod{4}$) divides $a^2+b^2$ and $a+2ab$ then $p\mid2b+1$ , $p\mid4a^2+1$ and $p\mid b-2a^2$ but all these seem pointless.
Am I missing something obvious here?

3

There are 3 best solutions below

0
On BEST ANSWER

Isn't a=9, b=19 a counter example?

3
On

This is false. A counter-example is $a=2, b=25$ with $$\gcd(a^2+b^2, a+2ab)=\gcd(629, 102)=17$$ Other small counter-examples are the pairs: $(4,19), (9,19), (15,8), (17,6), (17,19), (19,8).$

Edit: Playing around with my code, I numerically verified for $1 \le a,b \le 10000$ the slightly changed statement: If $\gcd(a,b)=1$ then $\gcd(a^2+b^2,a+2b)=1$ or $5$.

0
On

suppose $gcd(a,b)=1$ and let $d=gcd(a^2+b^2,a+2b)$

the identity

$(a^2+b^2)+(a+2b)(2b-a)=5b^2$

shows that $d$ divides $5b^2$ and

since $5a^2=5(a^2+b^2)-5b^2$ , $d$ divides $5a^2$

since $a$ and $b$ are relatively prime, $d$ divides $5$