Number of primes

  • #1
205
4
How do computers evaluate the number of primes below a given integer?
 

Answers and Replies

  • #3
fresh_42
Mentor
Insights Author
2021 Award
16,667
15,965
How do computers evaluate the number of primes below a given integer?
This depends on so many parameters, that it can't be answered, except perhaps by the sieve of Eratosthenes, or simply by ##|\pi(x)-\operatorname{Li}(x)|<\dfrac{\sqrt{x}\ln x}{8\pi}##.

The literature has many algorithms as well as estimations for ##\pi(x)##. Just search for them.
 

Related Threads on Number of primes

Replies
5
Views
701
Replies
10
Views
4K
  • Last Post
Replies
8
Views
3K
  • Last Post
Replies
5
Views
1K
Replies
2
Views
616
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
2
Views
15K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
1
Views
2K
Top