This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
 Documentation / Mathematica / Built-in Functions / Mathematical Functions / Number Theory  /
PrimePi

  • PrimePi[ x ] gives the number of primes less than or equal to x.
  • The argument of PrimePi can be any positive real number.
  • PrimePi[1] gives 0.
  • See the Mathematica book: Section 3.2.4.
  • See also Implementation NotesA.9.44.7MainBookLinkOldButtonDataA.9.44.7.
  • See also: Prime, Zeta.

    Further Examples

    The number of primes up to , , ..., .

    In[1]:=

    Out[1]=