As stated in an answer here, there is no easy algorithm for computing the radical of an integer. My question is whether or not there is an efficient algorithm to computer whether or not the radical of a number is any value, for my purpose, $10$. Let's call the integer $n$.
Initially I thought of iteratively checking if it is divisible by all prime factors of $10$, then dividing $n$ by the prime factors of $10$ until it is no longer possible, checking whether or not the resulting number is $1$. This works with $10$, but not any number where the radical of this number is not the number itself.
Then I thought of iterating through primes up to $\sqrt{n}$, checking if it is divisible by all and only the prime factors of $10$. This also does not work with numbers where the radical is not itself. For my purpose this is a minor inconvenience, but can be dealt with. A more general answer would be preferable if similarly efficient.
TL;DR: How does one calculate whether the radical of $n$ is equal to $m$ ($10$ in my case) efficiently?