TITLE: Euclid's Lemma and $\gcd(a,b)=1\Rightarrow \gcd(a^n,b^k)= 1$
QUESTION [6 upvotes]: I'm solving some problems in Apostol's Intro to Analytic Number Theory. He asks to prove
$$(a,b)=1 \wedge c|a \wedge d|b\Rightarrow (c,d)=1$$
My take is
$$\tag 1(a,b)=1 \Rightarrow 1=ax+by$$
$$ \tag 2 c|a \Rightarrow a=kc$$
$$\tag 3d|b \Rightarrow b=jd$$
$$(1),(2),(3) \Rightarrow 1=ckx+djy=cx'+dy'\Rightarrow (c,d)=1$$
Is this correct or is something missing?
I intend to use something similar to prove 
$$\eqalign{
  & \left( {a,b} \right) = 1 \wedge \left( {a,c} \right) = 1 \Rightarrow \left( {a,bc} \right) = 1  \cr 
  & \left( {a,b} \right) = 1 \Rightarrow \left( {{a^n},{b^k}} \right) = 1;n \geqslant 1,k \geqslant 1 \cr} $$
so I'd like to know.

REPLY [2 votes]: I prefer to use factorization in prime numbers. If $a=p_1^{n_1}\cdot\ldots\cdot p_r^{n_r}$ and $b=p_1^{m_1}\cdot\ldots\cdot p_r^{m_r}$ then $(a,b)=p_1^{k_1}\cdot\ldots\cdot p_r^{k_r}$ with $k_i=\min \{n_i,m_i\}$. For example, if $(a,b)=1$ then $k_i=0$ for every $i=1,\ldots,r$, which is equivalent to $n_i=0$ or $m_i=0$. As $a^n=p_1^{n~n_1}\cdot\ldots\cdot p_r^{n~n_r}$ and $b^k=p_1^{k~m_1}\cdot\ldots\cdot p_r^{k~m_r}$, therefore $(a^n,b^k)=p_1^{l_1}\cdot\ldots\cdot p_r^{l_r}$ with $l_i=\min \{n~n_i,k~m_i\}=0$, and $(a^n,b^k)=1$.
In fact, Apostol's book makes exhaustive use of factorization in the initial chapters.