Answer by Jeffrey Shallit for Algorithm for detecting prime powers
See Dan Bernstein's paper, ``Detecting perfect powers in essentially linear time.'' Mathematics of Computation 67 (1998), 1253--1283, available at http://cr.yp.to/papers.html#powers. Here "linear"...
View ArticleAnswer by Andrej Bauer for Algorithm for detecting prime powers
If $n = p^k$ with $p \geq 2$ then $k \leq \log_2 n$. For each candiate $k$, we can compute the integral part of $m = \lfloor n^{1/k} \rfloor$ in time polynomial in $\log_2 n$, and then test whether the...
View ArticleAnswer by Mark Lewko for Algorithm for detecting prime powers
If N is a prime power it is of the form $p^i$ where $i \leq \log_2(N)$. One can thus compute each of the first $\log_2(N)$ roots of $N$, and test if the resulting number is (first an integer) and then...
View ArticleAlgorithm for detecting prime powers
While reading Peter Shor's paper Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer, I came across the following quote:"This scheme will thus work as long...
View Article