If $\gcd(a,b)=p$, a prime then how to find possible values of $\gcd(a^2,b)$ and $\gcd(a^3,b^2)$?
All I have identified is that the gcd should be a power of $p$, but cannot identity exactly the possible values.
If $\gcd(a,b)=p$, a prime then how to find possible values of $\gcd(a^2,b)$ and $\gcd(a^3,b^2)$?
All I have identified is that the gcd should be a power of $p$, but cannot identity exactly the possible values.
On
More generally: If $(a, b) = p$, what is $(a^m, b^n)$?
($(x, y) = \gcd(x, y)$)
Let $v_p(u) =\max\{k\,|\,p^k|u\} $.
Then $a = p^{v_p(a)}c, b = p^{v_p(b)}d $ with $(c, d) = 1$.
Then $(a, b) =p^{\min(v_p(a), v_p(b))} $.
$\begin{array}\\ v_p((a^m, b^n)) &=v_p(((p^{v_p(a)}c)^m, (p^{v_p(b)}d)^n))\\ &=v_p((p^{mv_p(a)}c^m, p^{nv_p(b)}d^n))\\ &=v_p((p^{mv_p(a)}, p^{nv_p(b)})) \qquad\text{since } (c, d) = 1\\ &=v_p(p^{\min(mv_p(a),nv_p(b))})\\ &=\min(mv_p(a),nv_p(b))\\ \end{array} $
If $\min(v_p(a),v_p(b)) =1$, then $(1)\ v_p(a) = v_p(b) = 1 $, or $(2)\ v_p(a) =1, v_p(b) \ge 2 $, or $(3)\ v_p(a) \ge2, v_p(b) =1 $.
Case 1: $v_p((a^m, b^n)) =\min(m,n) $.
Case 2: $v_p((a^m, b^n)) =\min(m,nv_p(b)) $.
Case 3: $v_p((a^m, b^n)) =\min(mv_p(a),n) $.
If $m = n$, all three cases reduce to $m$.
If $m > n$ the cases become (1) $n$, (2) $\min(m,nv_p(b))$, (3) $n$.
Case 2 then becomes $m$ if $v_p(b) \ge m/n$, $nv_p(b)$ if $v_p(b) \le m/n$.
On
If $\gcd(a,b)=p$, then $p$ exactly divides one of $a$ or $b$. Say $p\parallel a$, so we can factor as $a=pm$, $b=p^en$, for some $e$, $m$, $n\in\mathbb{Z}$ with $e\geq1$ and $\gcd(p,m)=\gcd(p,n)=1$. Note $\gcd(m,n)=1$ otherwise $a$ and $b$ share a common divisor other than $1$ and $p$, implying $\gcd(a,b)>p$.
Let $\gcd(a,b)=(a,b)$.
Now, if $e=1$ $$(a^2,b)=(p^2m^2,pn)=p(pm^2,n)\overset{(p,mn)=1}{=}p(m^2,n)\overset{(m,n)=1}{=}p$$
and if $e\geq2$ $$(a^2,b)=(p^2m^2,p^{e}n)=p^2(m^2,p^{e-2}n)\overset{(p,mn)=1}{=}p^2(m^2,n)\overset{(m,n)=1}{=}p^2$$
For the next, if $e=1$ $$(a^3,b^2)=(p^3m^3,p^2n^2)=p^2(pm^3,n^2)\overset{(p,mn)=1}{=}p^2(m^3,n^2)\overset{(m,n)=1}{=}p^2$$ and if $e\geq2$ $$(a^3,b^2)=(p^3m^3,p^{2e}n^2)=p^3(m^3,p^{2e-3}n^2)\overset{(p,mn)=1}{=}p^3(m^3,n^2)\overset{(m,n)=1}{=}p^3$$
Now do the same with $p\parallel b$, so we can factor as $a=p^em$, $b=pn$, similar to before.
Now, if $e\geq1$ $$(a^2,b)=(p^{2e}m^2,pn)=p(p^{2e-1}m^2,n)\overset{(p,mn)=1}{=}p(m^2,n)\overset{(m,n)=1}{=}p$$
For the next, if $e\geq1$ $$(a^3,b^2)=(p^{3e}m^3,pn^2)=p(p^{3e-1}m^3,n^2)\overset{(p,mn)=1}{=}p(m^3,n^2)\overset{(m,n)=1}{=}p$$
Let $e$ and $f$ be the exponents of $p$ in the prime decomposition of $a$, respectively $b$. Then - given that $\gcd(a,b)=p$ - it must be the case that $\min(e,f) = 1$.
So, by simple enumeration of all possible cases, what are the possible values of $\min(2e, f)$ and $\min(3e, 2f)$? That will lead directly to the answer to your question.