"Brute-forcing through roots" is actually a fine strategy, though... you only need to check $a^{1/n}$ for $O(\log a)$ possible exponents $n$.
Of course there are complications involved in numerically extracting the $n$th root; these can be avoided by doing a binary search on integers $b$ to find a $b$ which minimizes $|b^n - a|$. This version of the algorithm will run in $O(\log a)^2$ time (since you will need $O(\log a)$ iterations of binary search).
Finally, you can of course factor $a$ and look at the prime exponents in the factorization. In terms of algorithmic complexity, this will be slower than the "brute force" solution, since there is no known factorization algorithm that runs in time polynomial in $\log a$.
p1^e1 * p2^e2 * ... * pn^enthere are(p1+1) * (p2+1) * ... * (pn+1)ways to arrange those factors on the inner or outer exponent? – Tobl Nov 13 '17 at 21:11ei, notpi. I don't think comments can be edited? – Tobl Nov 13 '17 at 21:40