Prove or disprove this implication

139 Views Asked by At

Prove or disprove:

If $x, a, b > 0$ are integers such that $$\gcd(x-a, x+b) = 1\ \ \mbox{and}\ \ \gcd(2x-a, x+b) > 1,$$ then $$a+b = x.$$

2

There are 2 best solutions below

2
On BEST ANSWER

Disproved by counterexample: a=2, b=57, x=15

Python code:

from fractions import gcd
def valid(a,b,x):
  if gcd(x-a,x+b)==1 and gcd(2*x-a, x+b)>1: return True
  else: return False

allset = [(a,b,x) for a in range(100) for b in range(100)  for x in range(100)]
validCombos = [y for y in allset if valid(*y)]
def aplusbisx():
  if a+b ==x: return True
  else: return False

asdf = [y for y in vaiidCombos if aplusbisx(*y)]
fdsa = [y for y in vaiidCombos if not aplusbisx(*y)]

For example fdsa[4678] returns (2, 57, 15), which is an counterexample

0
On

$x=13,a=2,b=1\Rightarrow (x-a,x+b)=(11,14)=1,(2x-a,x+b)=(24,14)=2>1$ but $a+b=3\ne 13=x$