Prime-counting function
ID: prime-counting-function
The prime-counting function counts the prime numbers not exceeding a real bound :Thus , and . It is a nondecreasing step function with a jump of one at each prime number, and for .
Computing one large value is different from listing every prime number below it. A number-theoretic sieve can do both up to a moderate bound; Legendre prime-counting formula and the Lehmer prime-counting algorithm instead organize counts of allowable factors. The Prime number theorem describes the long-term scale , rather than exact individual jump locations.
New to topics? Read the docs here!