iperfpow - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

iperfpow

determine if an integer is a perfect power

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

iperfpow( n )

iperfpow( n, 'p' )

Parameters

n

-

expression

p

-

name

Description

• 

If n is a positive integer and n=re, where r and e are positive integers with 1<e, then iperfpow( n ) returns r. If the second argument, p, is specified in the calling sequence, then it is assigned the value e.

• 

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

• 

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

• 

In all other cases, the command returns unevaluated.

Examples

iperfpow256

16

(1)

iperfpow125&comma;p

5

(2)

p

3

(3)

iperfpow216&comma;p

6

(4)

p

3

(5)

iperfpow12

FAIL

(6)

ifactor12

223

(7)

iperfpow1&comma;p

1

(8)

p

2

(9)

iperfpowx

iperfpowx

(10)

iperfpow25

Error, (in iperfpow) first argument must be a positive integer

See Also

integer

iroot