chickadee » math » prime-power

prime-power mprocedure
m
integer

If M is a power of the form (expt p n) where p is prime, then a list with the prime and the exponent is returned, otherwise #f is returned.

> (prime-power (expt 3 4))
(3 4)
> (prime-power (expt 6 4))
#f