determine if an integer is a perfect power - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Group Theory : Numbers : Integer Functions : iperfpow

iperfpow - determine if an integer is a perfect power

Calling Sequence

iperfpow(n)

iperfpow(n, 'p')

Parameters

n

-

expression

p

-

name

Description

• 

If n is a positive integer and n = r^k, where r and k are positive integers, then iperfpow(n) returns r.  If the second argument, 'p', is specified in the calling sequence, it is assigned the value k.

• 

It is an error for n to evaluate to a numeric which is not a positive integer.

• 

This function returns FAIL if it is not able to establish that n is a perfect power of an integer.

• 

In all other cases, the function returns unevaluated.

Examples

iperfpow256

16

(1)

iperfpow125,'p'

5

(2)

p

3

(3)

See Also

integer


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam