### Perfect power testing

Here 1 ≤ n ≤ 10^{100}.

If n is a perfect power, the program returns x and p, where n = x^{p}, p > 1 and p is the least such integer (a prime).
See Algorithm A, page 315, *Sieve algorithms for perfect power testing*, E. Bach and J. Sorenson, Algorithmica **9** (1993) 313-328.

Algorithm B, page 318, is more efficient.

This is a BCMATH conversion of a BC program.

*Last modified 7th June 2006*

Return to main page