Show that if $n$ is any integer, then $\gcd(a+nb,b)=\gcd(a,b)$.
I started out by letting $d=\gcd(a,b)$ and $p=\gcd(a+nb,b)$. I want to show that $p=d$.
So for integers $q_{i} \in \mathbb{Z}$, $i=1,2,3,4$,
$a=dq_{1}$
$b=dq_{2}$
$a+nb=pq_{3}$
$b=pq_{4}$.
Then $nb = pq_{3}-a = pq_{3}-dq_{1}$. So $b=\frac{pq_{3}-dq_{1}}{n}$. What if $n=0$?
Since the question says to show that if $n$ is any integer, does the conclusion I reached imply that the statement is false or did I do something wrong?
It is obvious that $\gcd(a+nb,b)=\gcd(a,b)$ if $n=0$ but then why do my equations above contradict that?
No comments:
Post a Comment