Show that if $a$ and $b$ are positive integers with $(a,b)=1$ then $(a^n, b^n) = 1$ for all positive integers n [duplicate]

Show that if $a$ and $b$ are positive integers with $(a,b)=1$ then $(a^n, b^n) = 1$ for all positive integers n

Hi everyone, for the proof to the above question,

Can I assume that since $(a, b) = 1$, then in the prime-power factorization of a and b, they have no prime factor in common, when they are taken to the $nth$ power, they will still have no prime factors in common, and so $(a^n, b^n) = 1$ for all positive integers n.

I think I'm jumping to conclusions here again, if so, leave some tips on how to do the proof properly, thanks :)

And also, I do not know how to approach the reverse problem where if $(a^n, b^n) = 1 then (a, b) = 1$, any guidance will be much appreciated!


Here's an approach that doesn't use prime factorization.

Lemma: For all $m,r,k\in \Bbb N$, $\gcd(m,k)=1\implies \gcd(m,k^r)=1$.

Proof: Let $m,r,k\in \Bbb N$ be such that $\gcd(m,k)=1$.

Bézout yields $um+vk=1$, for some $u,v\in \Bbb Z$.

Thus $$1=1^r=(um+vk)^r=\sum \limits_{j=0}^r\left({r\choose j}(um)^{r-j}(vk)^j\right)=\sum \limits_{j=0}^{r-1}\left({r\choose j}(um)^{r-j}(vk)^j\right)+(vk)^r,$$ which implies $$m\underbrace{\color{blue}{\sum \limits_{j=0}^r\left({r\choose j}u^{r-j}m^{r-j-1}(vk)^j\right)}}_{\huge \in \Bbb Z}+k^r\color{blue}{v^r}=1.$$

Again Bézout says that $\gcd(m,k^r)=1$ (due to the blue scalars).$\,\square$

You can now use the lemma twice: $\gcd(a,b)=1\implies \gcd(a,b^n)=1\implies \gcd(a^n,b^n)=1$.