Is there a general method for testing numbers to see if they are perfect $n$th powers?
For example, suppose that I did not know that $121$ was a perfect square. A naive test in a code might be to see if $$\lfloor\sqrt{121}\rfloor=\sqrt{121}$$
But I imagine there are much more efficient ways of doing this (if I'm working with numbers with many digits).
from Hot Weekly Questions - Mathematics Stack Exchange
Post a Comment