2

I was solving some basic number theory problems when I came across :

What is $\gcd(a^2 + b^2, a+b)$, where $a$ and $b$ are relatively prime integers that are not both $0$?

Can someone help me out ? Even a hint , upon which I can build , would suffice ...

Bill Dubuque
  • 282,220
pranav
  • 1,503
  • 1
    A start: Any common divisor of $a^2+b^2$ and $a+b$ is a common divisor of $a+b$ and $(a+b)^2-(a^2+b^2)$, which is $2ab$. – André Nicolas Feb 20 '15 at 01:51
  • Hi , @AndréNicolas -- I got upto this point that a prime divisor of $(a^{2} + b^{2} , a+b)$ , will also divide $2ab$ $\Rightarrow$ it also divides $2$ $\Rightarrow$ it is $=$ $1$ or $2$ . How can I proceed after that ? – pranav Feb 20 '15 at 01:55
  • 1
    If $a,b$ are both odd, then it's 2. Otherwise, it's 1. – vadim123 Feb 20 '15 at 02:00
  • 1
    You are finished, once you show (using a couple of examples) that $1$ and $2$ are both possible. But you need to show that any common divisor is $1$ or $2$, not, as you put it, that a prime divisor of the gcd is $1$ or $2$. – André Nicolas Feb 20 '15 at 02:02
  • Thanks @AndréNicolas , I got it :) – pranav Feb 20 '15 at 02:03
  • Thanks @vadim123 , I got it :) – pranav Feb 20 '15 at 02:04
  • 1
    @pranav The answer is $,(a!+!b,2).,$ More generally, when $,d = (a,b) > 1,$ it is $,(a!+!b,2d^2),,$ as I show in my answer. – Bill Dubuque Feb 20 '15 at 02:25

3 Answers3

2

Hint Modulo $a+b$, $(a+b)^2\equiv 0$ so $a^2+b^2\equiv -2ab$. Hence you want to compute $(2ab,a+b)$.

Pedro
  • 125,149
  • 19
  • 236
  • 403
2

Hint If $d= \gcd(a+b,a^2+b^2)$, then $d\mid(a-b)(ab)$ hence

$$d \mid (a^2+b^2) \pm (a^2-b^2)$$

N. S.
  • 134,609
1

Hint $\ \ (a\!+\!b,\ \color{darkorange}{a^2\!+\!b^2})\, =\, (a\!+\!b,\,\overbrace{\color{#c00}{2a^2}, \ \color{blue}{2ab}, \ \color{#c0f}{2b^2}}^{\textstyle 2\:\!\color{#0a0}{(a,b)}^2})\,$ [$=\, (a\!+\!b,\:\!2)\ $ if $\ \color{#0a0}{(a,b)=1}$]

by noting: $\ \underbrace{\color{#888}{b^2\!-\!a^2}+\color{#c00}{2a^2} = (\color{#888}{a\!+\!b})^2\!-\color{blue}{2ab} = \color{#c0f}{2b^2}+\color{#888}{a^2\!-\!b^2}}_{\textstyle {\rm all} = \color{darkorange}{a^2\!+b^2}}\ $ & $\ \color{#888}{\rm grays}\equiv 0\pmod{\!a\!+\!b}$

Bill Dubuque
  • 282,220