numlib::ispower

Test for perfect powers

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

numlib::ispower(n)

Description

numlib::ispower(n) tests whether n is of the form ak for some integers a, k with a, k ≥ 2.

numlib::ispower returns FALSE if n is not a perfect power.

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

Examples

Example 1

This number is a perfect power:

numlib::ispower(1977326743)

This number is not a perfect power:

numlib::ispower(1977326744)

Parameters

n

An integer

Return Values

numlib::ispower returns a sequence of two positive integers greater than 1, or FALSE if n is not a perfect power.

See Also

MuPAD Functions

Was this topic helpful?