is.primepower {HadamardR} | R Documentation |
Checks whether given number is a prime power or not. Note that for a prime number, it would return NULL.
is.primepower(p)
p |
integer |
Returns a and b where p=a^b, otherwise NULL. Uses primeFactors() function of numbers package.
a and b where p=a^b and a is a prime number. Otherwise NULL
is.primepower(2048)
#2 11
is.primepower(7)
#NULL
is.primepower(100)
#NULL