Short gcd proof Suppose $a,b\in\mathbb{Z}$ that $a$ and $b$ are both positive and that $gcd(a,b)=d$. Prove that if $n\in\mathbb{Z}$ is positive, the $gcd(an,bn)=dn$.
My attempt...
$gcd(a,b)=d$ so $d|a$ and $d|b$. Then $a=dk$ and $b=dl$. Also let $d=as+bt$ the smallest positive linear combination.
By multiplying all of them by $n$ I get.
$an=dnk$, $bn=dnl$, and $dn=ans+bnt$.
Substituting in $an$ into $dn=ans+bnt$ I get 
$dn=dnks+bnt$ after some algebra I get $bn=dn(\frac{1-ks}{t})$
Similarly for $an$ I get $an=dn(\frac{1-lt}{s})$. So $dn|an$ and $dn|bn$.
Then If $c$ is common divisor of $a$ and $b$. Multiplying by $n$ and substituting in for $dn=ans+bnt$
I get that $dn=cn(ps+qt)$ so $cn|dn$ therefore $cn$$\leq$$dn$. 
So $gcd(an,bn)=dn$.
 A: OK, but perhaps too long.
Write $a=da'$, $b=db'$; then $an=dna'$, $bn=dnb'$, so $dn$ is a common divisor of $an$ and $bn$, and therefore $dn\mid \gcd(an,bn)$. On the other hand, from $d=as+bt$, we get $dn=ans+bnt$, which implies $\gcd(an,bn)\mid dn$.
A: Looks okay to me. There's an easier (in my opinion) proof though.
Consider $a=\prod\limits_i p_i^{a_i}$ , $b=\prod\limits_i p_i^{b_i}$ and $d=\prod\limits_i p_i^{d_i}$ the unique prime representations of $a,b,d$.
Then, by definition of gcd, you have $d_i=\min(a_i,b_i)\tag 1$
Now, consider the unique prime factorization of $n=\prod\limits_i p_i^{n_i}$. We then have,
$$an=\prod\limits_i p_i^{a_i+n_i}\quad\textrm{and}\quad bn=\prod\limits_i p_i^{b_i+n_i}$$
Define $k:=\gcd(an,bn)$. Then,
$$k=\prod\limits_i p_i^{\min(a_i+n_i,b_i+n_i)}=\prod\limits_i p_i^{n_i+\min(a_i,b_i)}=\left(\prod\limits_i p_i^{n_i}\right)\cdot\left(\prod\limits_i p_i^{\min(a_i,b_i)}\right)=nd$$
The last equality follows from $(1)$.

We used the following trivial result here : 


*

*$\min(a+x,b+x)=x+\min(a,b)$ for non-negative integers $a,b,x$

