A conjecture of exercise type: $\gcd(a,b)^2=\gcd(a^2+b^2,ab)$

118 Views Asked by At

This must be known, but I haven't found it and want help to prove it:

For all $a,b\in \mathbb Z$, $\gcd(a,b)^2=\gcd(a^2+b^2,ab)$

Tested for $10,000,000$ pseudo random number pairs.


From time to time, when testing my growing math packages BigZ and Forthmath, I recognize some patterns which I can't prove or disprove (or even have the ambition to). I post them here with the hope that it will not annoy too much. I hope you can bear with it.


4

There are 4 best solutions below

2
On BEST ANSWER

Both ways are quite easy : if $d = (a,b)$, then $d | a$ and $d | b$, so $d^2 | a^2, d^2 | b^2$ so $d^2 | a^2 + b^2$, and similarly, $d^2 | ab$. Consequently, $d^2 | (a^2 + b^2,ab)$.

The other way, consider the numbers $\frac ad$ and $\frac bd$. Note that these are coprime. Write $a \to \frac ad,b \to \frac bd$ so that $a,b$ are now coprime. We can see that if $p | a$ and $p \nmid b$ then $p | ab$ but $p \nmid a^2 + b^2$, and similarly if $p|b$ but $p \nmid a$. Consequently, $ab$ and $a^2+b^2$ don't share any prime factors. Therefore, $(ab,a^2+b^2) = 1$. The statement is therefore true when $a,b$ are coprime, and the general case follows from the fact that $(cd,ed) = d$ if $c,e$ are coprime, with $c = a^2+b^2,e = ab$ and $d = (a,b)$.

0
On

You need to prove that if $a$ and $b$ are coprime, then so are $a^2+b^2$ and $ab$. Assume that $a$ and $b$ are coprime, and $p\mid(a^2+b^2)$ and $p\mid ab$ for some prime $p$. Without loss of generality $p\mid a$ and $p\nmid b$, but that leads to $p\nmid(a^2+b^2)$, a contradiction.

0
On

It's easy to show LHS is a factor of RHS.

Now consider a prime power factor of RHS; write it as $p^{2\alpha+\beta}$ with $\beta=0$ or $1$. Then we have $$p^{2\alpha+\beta}\mid a^2+b^2,\,ab$$ and so $$p^{2\alpha+\beta}\mid a^2+b^2+2ab=(a+b)^2\ .$$ Since $(a+b)^2$ is a square, all its prime factors occur to even powers and so $$p^{\alpha+\beta}\mid a+b\tag{$*$}$$ (proof: consider $\beta=0$ and $\beta=1$ separately). But since $p^{2\alpha+\beta}$ is a factor of $ab$, we have that $p^{\alpha+\beta}$ is a factor of $a$ or of $b$ (again, consider $\beta=0$ and $\beta=1$ separately), and so by $(*)$ it is a factor of both.

Therefore $$p^{\alpha+\beta}\mid \gcd(a,b)\quad\Rightarrow\quad p^{2\alpha+2\beta}\mid \gcd(a,b)^2\quad\Rightarrow\quad p^{2\alpha+\beta}\mid \gcd(a,b)^2\ .$$ Since this is true for all primes, RHS is a factor of LHS.

0
On

Show, for positive integers $a$, $b\ge1$ that $$\gcd(a,b)^2=\gcd(a^2+b^2,ab)\tag{1}$$

Let $m=\gcd(a,b)$, so $m^2=\gcd(a,b)^2$.

Now $m\mid a$ and $m\mid b$, so $m^2\mid ab$. Let $a=a_1m$, $b=b_1m$, for some positive integers $a_1$, $b_1\ge1$, then $a^2+b^2=m^2a_1^2+m^2b_1^2=m^2(a_1^2+b_1^2)$, so $m^2\mid a^2+b^2$. Hence $$\gcd(a^2+b^2,ab)=m^2\gcd(a_1^2+b_1^2,a_1b_1)\ge m^2$$ Now since $m=\gcd(a,b)$, we must have $\gcd(a_1,b_1)=1$.

Assume for some integer $p>1$ that $p\mid a_1^2+b_1^2$ and $p\mid a_1b_1$, by which $p\mid a_1$ or $b_1$.

If $p\mid a_1$ and $p\mid a_1^2+b_1^2$, this implies $p\mid(a_1^2+b_1^2)-a_1=a_1(a_1-1)+b_1^2$.

Let $a_1=pa_2$, then $a_1(a_1-1)+b_1^2=pa_2(pa_2-1)+b_1^2=p[a_2(pa_2-1)+\frac{b_1^2}{p}]$, and so $p\mid b_1^2$ a contradiction. If $p\mid b_1$ the argument is the same. Therefore $p\nmid a_1^2+b_1^2$, hence $\gcd(a_1^2+b_1^2,a_1b_1)=1$ and $(1)$ holds.