numlib::ispower
-- test for
perfect powersnumlib::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.
numlib::ispower(n)
n |
- | an integer |
numlib::ispower
returns a sequence of two positive
integers ≥2, or FALSE
if n
is not a
perfect power.
This number is a perfect power:
>> numlib::ispower(1977326743)
7, 11
This number is not a perfect power:
>> numlib::ispower(1977326744)
FALSE