[Math] Diophantine Equation Proof: Show that if $n=ab-a-b$, then there are no nonnegative solutions of $ax + by = n$

diophantine equationselementary-number-theory

Let $a$ and $b$ be relatively prime positive integers and let $n$ be a positive integer. A solution $(x, y)$ of the linear diophantine equation $ax + by = n$ is nonnegative when both $x$ and $y$ are non-negative. Show that if $n=ab-a-b$, then there are no nonnegative solutions of $ax + by = n$.

Not sure where to begin for this proof question. Anyone got any ideas?

Best Answer

Substituting, we have \begin{align} ax+by &= n \\ &= ab-a-b \\ a(x+1)+b(y+1) &= ab. \end{align}

As $\gcd(a,b)=1$, this implies $a \mid (y+1)$ and $b \mid (x+1)$, say $x+1=br$ and $y+1=as$ for positive integers $r,s$. Now substitute and the answer should be clear.

Hope this helps!
Kieren.

Related Question