Prime-Counting Function definition
The prime-counting function π(x) gives the number of primes less than or equal to x.
Prime-Counting Function in a picture
How it works
Count each prime once, starting with 2. The value stays constant between prime inputs and increases by one at each prime. The symbol π here names the counting function, with x as its input.
Worked examples
Find π(10).
The primes are 2, 3, 5, and 7. The count is 4.
Find π(11) − π(10).
11 is prime, so the count increases by 1.
Find π(2.5).
2 is the only prime at most 2.5, so the count is 1.
Common mistake
The definition includes the endpoint if it is prime. Count 11 when finding π(11).
Quick check
What is π(1)?
Show answer
0.
What happens to π(x) at x = 7?
Show answer
It increases by one because 7 is prime.
Sources
Flashcard
Prime-Counting Function
Reveal the definition
The prime-counting function π(x) gives the number of primes less than or equal to x.
Effortless Math. “Prime-Counting Function.” Math Dictionary.
