Skip to content

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

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)=true⁡\displaystyle \operatorname{is\_prime\_power}(8) = \operatorname{true}
    is_prime_power(8)

    In the solver, is_prime_power(8) gives true.

    Open in the solver
  • 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.