Skip to content

PrimePowerQ

PrimePowerQ(n)

returns True if n is a power of a prime number.

Examples

>> PrimePowerQ(9)
True
>> PrimePowerQ(52142)
False
>> PrimePowerQ(-8)
True
>> PrimePowerQ(371293)
True
>> PrimePowerQ(1)
False

Implementation status

  • ☑ - partially implemented

Github