Skip to content

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

Léela en español

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

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

Prime-counting function (prime_pi)

How many primes are at most a number.

How to write it

prime_pi(x)

x
The number to count up to. A symbol is left as it is. Takes a number.

Examples

  • prime_pi⁡(100)=25\displaystyle \operatorname{prime\_pi}(100) = 25
    prime_pi(100)

    In the solver, prime_pi(100) gives 25.

    Open in the solver
  • prime_omega

    How many primes divide a whole number, counted with multiplicity.

  • prime_nu

    How many distinct primes divide a whole number.

  • previous_prime

    The greatest prime less than a number.

  • nth_prime

    The n-th prime, counting 2 as the first.

  • next_prime

    The least prime greater than a number.

  • is_prime_power

    Test whether a whole number is a power of a prime.