WLJS LogoWLJS Notebook

PrimePi

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

Examples

Count primes up to 100:

PrimePi[100]
(* 25 *)

Count primes up to 1000:

PrimePi[1000]
(* 168 *)

Please visit the official Wolfram Language Reference for more details.

On this page