I want to find some arithmetic way of solving these. For the first one:
$$\gcd(1,2) = 1 \Rightarrow 2 = 1*2 + 0 \\ \gcd(a,b) = d \Rightarrow \gcd(ak,bk)=dk,\\ \gcd(a,2a) = a$$
How do you do something like this for the others?
I want to find some arithmetic way of solving these. For the first one:
$$\gcd(1,2) = 1 \Rightarrow 2 = 1*2 + 0 \\ \gcd(a,b) = d \Rightarrow \gcd(ak,bk)=dk,\\ \gcd(a,2a) = a$$
How do you do something like this for the others?
HINT: $\gcd (a,b) = \gcd(a,a-b)$. (Prove this with the Euclidean algorithm if you'd like, or just from the usual definition.)
$\gcd(a,a+k)$ must divide $a$ and $a+k$ and therefore it must divide $(a+k)-a=k.$
So $\gcd(a,a+2)$ must divide $2$ and $\gcd(a,a+1)$ must divide $1$.
Therefore $\gcd(a,a+2)=1 $ or $2$
(if $a$ is odd then $2\nmid a$ so it's $1$; if $a$ is even then $2|a, a+2$ so it's $2$),
and $\gcd(a,a+1)=1$.