numtheory(deprecated)/pi - Maple Help

numtheory(deprecated)

 pi
 number of primes less than or equal to

 Calling Sequence pi(n)

Parameters

 n - expression, assumed to be of type integer

Description

 • Important: The numtheory package has been deprecated.  Use the superseding command NumberTheory[PrimeCounting] instead.
 • The function pi(n) computes the number of prime numbers less than or equal to the given integer n.

Examples

Important: The numtheory package has been deprecated.  Use the superseding command NumberTheory[PrimeCounting] instead.

 > $\mathrm{with}\left(\mathrm{numtheory}\right):$
 > $\mathrm{pi}\left(10\right)$
 ${4}$ (1)
 > $\mathrm{pi}\left(100\right)$
 ${25}$ (2)
 > $\mathrm{pi}\left(1000\right)$
 ${168}$ (3)
 > $\mathrm{pi}\left(10000\right)$
 ${1229}$ (4)
 > $\mathrm{nops}\left(\mathrm{select}\left(\mathrm{isprime},\left[\mathrm{}\left(2..10000\right)\right]\right)\right)$
 ${1229}$ (5)
 > $\mathrm{Li}\left(10000.0\right)$
 ${1246.137216}$ (6)
 > $\frac{10000.0}{\mathrm{ln}\left(10000.0\right)}$
 ${1085.736205}$ (7)