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. :)
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.