Assuming that $\gcd(a,b)=1$, show that $\gcd(a+b,a^2+b^2)=1$ or $2$.

498 Views Asked by At

My attempt: I tried to use the property $\gcd(a,b)=\gcd(a,b-a)$ but ended up with a meaningless expression. I also tried assuming that if $a$ is of the form $2k_1$ then $b$ must be of the form $2k_2+1$ where $k_1$ and $k_2$ are integers, but this approach didn't work. Finally I deduced that $d=\gcd(a+b,a^2+b^2)|2ab.$ I am interested in knowing how this particular line of reasoning can be extended in order to solve this problem.

Note: I have read the answers to this problem here. My question is different in that it asks one to specifically use the fact that $d|2ab$ to prove that $d=1$ or $2$. Although there is an answer with the exact reasoning provided in that link, I am not sure whether the argument is logically sound. In particular I would like to know whether the following claim $d|2ab\Rightarrow d=1,2$ or $d|a$ or $d|b$ is true or false.

4

There are 4 best solutions below

7
On BEST ANSWER

Let $p$ be a prime divisor of $d$. If $p \mid a$ then as it divides $a+b$ we have that it divides $a+b-a=b$. But this means that $p=1$, as $gcd(a,b) = 1$

Now similarly we can consider the cases $p \mid b$ or $p \mid 2$

0
On

Notice how $(a+b)^2=a^2+b^2+2ab$, so we have: $$\gcd(a+b,a^2+b^2)=\gcd(a+b,(a+b)^2-2ab)=\gcd(a+b,-2ab)=\gcd(a+b,2ab)$$ Now for all primes $p$ such that $p\mid ab$, we have: $$(p\mid a\implies p\nmid b\implies p\nmid a+b)\vee(p\mid b\implies p\nmid a\implies p\nmid a+b)$$ Hence $\gcd(a+b,ab)=1$ and therefore $\gcd(a+b,2ab)=\gcd(a+b,2)$, which is obviously equal to $1$ or $2$.

1
On

If $d$ divides both $a+b$ and $a^2+b^2$

$d$ must divide $a^2+b^2+(a+b)(a-b)=2a^2$

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

$d$ must divide $(2a^2,2b^2)=2(a^2,b^2)$

As $(a,b)=1,(a^2,b^2)=1$

Finally, $(a+b,a^2+b^2)=2$ if $a+b$ is even as $a^2+b^2=(a+b)^2-2ab$ will also be even in that condition

Else $(a+b,a^2+b^2)=1$

0
On

Using Bézout's lemma: There exists $x$ and $y$ such that $ax+by=1$.

Then $(a^2+b^2)\left((x-y)^2\right)+(a+b)\left(a (x^2+2 x y-y^2)+b (y^2+2 x y-x^2)\right) = 2(ax+by)^2=2$.

Hence $\gcd(a^2+b^2,a+b) \mid 2$