## `numlib::ispower` -- test for perfect powers

#### Introduction

`numlib::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)`

#### Parameters

`n` | - | an integer

#### Returns

`numlib::ispower` returns a sequence of two positive integers ≥2, or `FALSE` if `n` is not a perfect power.

#### Related Functions

`_power`, `ifactor`, `isqrt`

#### Details

- Among several pairs (a,k) for which n=ak, that one with minimal a is returned.

#### Example 1

This number is a perfect power:

    >> numlib::ispower(1977326743)

                                       7, 11

This number is not a perfect power:

    >> numlib::ispower(1977326744)

                                       FALSE

#### Changes

- no changes

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000