Question: If $|a^5| = 12$, what are the possibilities for $|a|$? If $|a^4| = 12$, what are the possibilities for $|a|$?
Now my approach was using the fact that $|a^k| = \frac{n}{\gcd(n,k)}$
So that the first one for example, $12 = \frac{n}{\gcd(n,5)} \implies \gcd(n,5) = \frac{n}{12}$, so $n = 5*12$ and $n = 60$.
Similarly for the second, $12 = \frac{n}{\gcd(n,4)} \implies \gcd(n,4) = \frac{n}{12}$, so $n = 4*12$ and $n = 48$.
Is there a smarter way to go about this or a fact I'm not using that would make this easier.
The possible values of $\gcd(n,k)$ are exactly the divisors of $k$.
The possible values of $\gcd(n,5)$ are $1,5$. Hence $n = 12 \gcd(n,5) = 12,60$.
The possible values of $\gcd(n,4)$ are $1,2,4$. Hence $n=12 \gcd(n,4) =12, 24, 48$.
You still need to test those candidates. In the second case, only $n=48$ works.