Suppose $\gcd(a,b)=1$. Let $d=\gcd(a+b,a^2+b^2)$. I want to prove that $d$ equals $1$ or $2$.
I get that $d\mid2ab$ but I can't find a linear combination that will give me some help to use the fact that $\gcd(a,b)=1$.
Suppose $\gcd(a,b)=1$. Let $d=\gcd(a+b,a^2+b^2)$. I want to prove that $d$ equals $1$ or $2$.
I get that $d\mid2ab$ but I can't find a linear combination that will give me some help to use the fact that $\gcd(a,b)=1$.
Well I found the solution. (Ohh and I was searching a solution without using prime numbers.)
Well $d\mid a^2+b^2-(a-b)(a+b)\;\Rightarrow\;d\mid 2b^2$. Same with $d\mid 2a^2$ so $d$ is a common divisor of $2b^2$ and $2a^2$ so it divides the $\gcd(2a^2,2b^2)=2\gcd(a^2,b^2)$. Since the $\gcd(a^2,b^2)=1$ because $\gcd(a,b)=1$ it follows that $d$ is a divisor of $2$, so it is $1$ or $2$.
I didnt find a way to continue with the $d\mid 2ab$....
Suppose $p$ is a prime that divides $a+b$ and $a^2+b^2$, then $p$ also divides $2ab$ and therefore it divides $2$ or $a$ or $b$, but if $p$ divides $a$ and $a+b$...
Hint $\,\ d=(a\!+\!b,a^2\!+b^2)\mid 2a^2,2ab,2b^2\Rightarrow\,d\mid(2a^2,2ab,2b^2)= 2(a,b)^2 = 2\ $ by $\ (a,b)=1$
Remark $\ $ More generally one easily proves $\ (a^2\!+b^2,a\!+\!b) = (2(a,b)^2,a\!+\!b)$
Bezout based approach
Since $(a,b)=1$, there are $x,y$ so that $ax+by=1$. Then $$ \begin{align} 1 &=(ax+by)^3\\ &=a^2\color{#C00000}{(ax^3+3bx^2y)}+b^2\color{#00A000}{(3axy^2+by^3)} \end{align} $$ Then, since $$ (a^2+b^2)+(a+b)(a-b)=2a^2 $$ and $$ (a^2+b^2)-(a+b)(a-b)=2b^2 $$ we have $$ \begin{align} &(a^2+b^2)\left[\color{#C00000}{(ax^3+3bx^2y)}+\color{#00A000}{(3axy^2+by^3)}\right]\\ +&(a+b)(a-b)\left[\color{#C00000}{(ax^3+3bx^2y)}-\color{#00A000}{(3axy^2+by^3)}\right]\\ =&2a^2\color{#C00000}{(ax^3+3bx^2y)}+2b^2\color{#00A000}{(3axy^2+by^3)}\\[6pt] =&2 \end{align} $$ Therefore, $(a+b,a^2+b^2)\mid2$.