This paper presents an algorithm that, given an integer n > 1, finds the largest integer k such that n is a kth power. A previous algorithm by the first author took time b 1+o(1) where b = Ign; more precisely, time b exp(O(lg b lg lg b)); conjecturally, time b(lg b) O(1) . The new algorithm takes time b(lg b) O(1) . It relies on relatively complicated subroutines-specifically, on the first author's fast algorithm to factor integers into coprimes-but it allows a proof of the b(lg b) O(1) bound without much background; the previous proof of b 1+o(1) relied on transcendental number theory. The computation of k is the first step, and occasionally the bottleneck, in many number-theoretic algorithms: the Agrawal-Kayal-Saxena primality test, for example, and the number-field sieve for integer factorization.
[1]
Daniel J. Bernstein,et al.
Detecting perfect powers in essentially linear time
,
1998,
Math. Comput..
[2]
Daniel J. Bernstein,et al.
Factoring into coprimes in essentially linear time
,
2005,
J. Algorithms.
[3]
Jeffrey Shallit,et al.
Factor refinement
,
1993,
SODA '90.
[4]
Eric Bach,et al.
Sieve algorithms for perfect power testing
,
1993,
Algorithmica.
[5]
David S. Johnson,et al.
Proceedings of the First Annual ACM-SIAM Symposium on Discrete Algorithms, 22-24 January 1990, San Francisco, California, USA
,
1990,
SODA.
[6]
D. J. Bernstein.
Fast multiplication and its applications
,
2008
.