Half of sum of any two relatively prime numbers will be relatively prime to half of their difference. How will I prove it?

380 Views Asked by At

Today while reading a tutorial on a programming problem, I have found this statement: Half of sum of any two relatively prime numbers will be relatively prime to half of their difference. I tried to figure it out. But was unable to do so. :(

Let a and b are two relatively prime (a>b). Then that post said,

  • (a+b)/2 and (a-b)/2 are relatively prime

If it would be product, then I might try with factors of a & b. But what about sum and subtract? How will I prove the statement given in the tutorial?

I searched for this but was unable to get my answer. I may solve that programming problem without knowing the proof. But I want to visualize the reason. Thanks in advance. :)

2

There are 2 best solutions below

2
On BEST ANSWER

Suppose that $(a+b)/2$ and $(a-b)/2$ are not relatively prime.

Then, there exist integers $d\ge 2,s,t$ such that $$\frac{a+b}{2}=ds,\quad \frac{a-b}{2}=dt$$ giving $$a=d(s+t),\quad b=d(s-t)$$ which contradicts that $a$ and $b$ are relatively prime.

0
On

For contradiction, suppose that $k \vert \frac{a+b}{2}$ and $k\vert\frac{a-b}{2}$ for some integer $k>1$. Then we may write $a+b = 2kl$ and $a-b = 2km$ for some numbers $l$ and $m$. If we add these equations we get $2a = 2k(m+l)$ so that $a = k(m+l)$ and if we subtract them we get $2b = 2k(l-m)$ so that $b = k(l-m)$. Then $k$ is a common divisor of $a$ and $b$, a contradiction.