numlib::ispower -- test for
perfect powers
Introductionnumlib::ispower(n) tests whether
n is of the form ak for some
positive integers a, k with a, k ≥2.
numlib::ispower returns FALSE if n is not a
perfect power.
Call(s)numlib::ispower(n)
Parametersn |
- | an integer |
Returnsnumlib::ispower returns a sequence of two positive
integers ≥2, or FALSE if n is not a
perfect power.
Related
Functions
Details
Example
1This number is a perfect power:
>> numlib::ispower(1977326743)
7, 11
This number is not a perfect power:
>> numlib::ispower(1977326744)
FALSE