iperfpow - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


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

> 

iperfpow⁡256

16

(1)
> 

iperfpow⁡125&comma;p

5

(2)
> 

p

3

(3)
> 

iperfpow⁡216&comma;p

6

(4)
> 

p

3

(5)
> 

iperfpow⁡12

FAIL

(6)
> 

ifactor⁡12

22⁢3

(7)
> 

iperfpow⁡1&comma;p

1

(8)
> 

p

2

(9)
> 

iperfpow⁡x

iperfpow⁡x

(10)
> 

iperfpow⁡−25

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

See Also

integer

iroot