iperfpow
determine if an integer is a perfect power
Calling Sequence
Parameters
Description
Examples
iperfpow( n )
iperfpow( n, 'p' )
n
-
expression
p
name
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.
iperfpow256
16
iperfpow125,p
5
3
iperfpow216,p
6
iperfpow12
FAIL
ifactor12
223
iperfpow1,p
1
2
iperfpowx
iperfpow−25
Error, (in iperfpow) first argument must be a positive integer
See Also
integer
iroot
Download Help Document