PrimePi

PrimePi[x]

gives the number of primes π(x) less than or equal to x.

Details

  • Integer mathematical function, suitable for both symbolic and numerical manipulation.
  • The argument of PrimePi can be any positive real number.
  • PrimePi[1] gives 0.
  • PrimePi automatically threads over lists.

Examples

open allclose all

Basic Examples  (2)

The number of primes up to a billion:

In[1]:=
Click for copyable input
Out[1]=

PrimePi increases every time there is a prime:

In[1]:=
Click for copyable input
Out[1]=

Scope  (2)

Applications  (3)

Properties & Relations  (3)

See Also

Prime  NextPrime  RiemannR  Zeta  ZetaZero

Tutorials

Introduced in 1991
(2.0)