Pi(x) = Number of primes <= x. It can be computed by verious methods.

Here are some notes from my integer calculator program XICalc:

Pi(X) = Number of primes <= X by sieve or Lehmer:

This is the prime counting function, for every real x >= 0, Pi(x) is the number
of primes p such that p <= x. For example Pi(5) = Pi(6) = 3. The 3 primes are 2,
3, and 5. For small x, the sieve of Eratosthenes is used, for large x, Lehmer's
formula is used. This is the method to use unless you are testing PiL1(x)
(slowest), PiM(x) (slow), or PiL(x) (fastest for large x).

PiL(X) = number of primes <= X by Lehmer's formula:

This is the prime counting function using Lehmer's formula. This is the fastest
of the three functions PiL1(x), PiM(x), and PiL(x).

PiL1(X) = number of primes <= X by Legendre's formula:

This is the prime counting function using Legendre's formula.

PiM(X) = number of primes <= X by Meissel's formula:

This is the prime counting function using Meissel's formula.

Return to Number Theory, Algorithms, and Real Functions

Return to Harry's Home Page

This page accessed times since July 27, 2007.

Page created by: hjsmithh@sbcglobal.net

Changes last made on Monday, 06-Aug-07 20:47:29 PDT