is_prime_power function
Test whether a whole number is a power of a prime.
How to write it
is_prime_power(n)
- n
- A whole number. Takes a whole number.
Examples
is_prime_power(8)In the solver,
Open in the solveris_prime_power(8)givestrue.
Related functions
- is_prime
Test whether a whole number is prime.
- next_prime
The least prime greater than a number.
- nth_prime
The n-th prime, counting 2 as the first.
- power_mod
A power modulo a number: base^exponent mod modulus.
- previous_prime
The greatest prime less than a number.
- prime_nu
How many distinct primes divide a whole number.