prime-number-theorem Updated 2025-07-16
Consider this is a study in failed computational number theory.
The approximation converges really slowly, and we can't easy go far enough to see that the ration converges to 1 with only awk and primes:Runs in 30 minutes tested on Ubuntu 22.10 and P51, producing:
sudo apt intsall bsdgames
cd prime-number-theorem
./main.py 100000000. It is clear that the difference diverges, albeit very slowly.
. We just don't have enough points to clearly see that it is converging to 1.0, the convergence truly is very slow. The logarithm integral approximation is much much better, but we can't calculate it in awk, sadface.
But looking at: en.wikipedia.org/wiki/File:Prime_number_theorem_ratio_convergence.svg we see that it takes way longer to get closer to 1, even at it is still not super close. Inspecting the code there we see:so OK, it is not something doable on a personal computer just like that.
(* Supplement with larger known PrimePi values that are too large for \
Mathematica to compute *)
LargePiPrime = {{10^13, 346065536839}, {10^14, 3204941750802}, {10^15,
29844570422669}, {10^16, 279238341033925}, {10^17,
2623557157654233}, {10^18, 24739954287740860}, {10^19,
234057667276344607}, {10^20, 2220819602560918840}, {10^21,
21127269486018731928}, {10^22, 201467286689315906290}, {10^23,
1925320391606803968923}, {10^24, 18435599767349200867866}}; Twin prime Updated 2025-07-16
Admissible prime k-tuple Updated 2025-07-16
Perfect information Updated 2025-07-16
Inflection Updated 2025-07-16
Type of microscopy Updated 2025-07-16
Diffraction limit Updated 2025-07-16
Lucas-Lehmer primality test Updated 2025-07-16
Are there infinitely many Mersenne primes? Updated 2025-07-16
MATLAB methlab pun Updated 2025-07-16
MATLAB Breaking Bad crossover
. Source. Moodle Updated 2025-07-16
Interactive Linear Algebra by Margalit and Rabinoff Updated 2025-07-16
Organism Updated 2025-07-16
List of libraries Updated 2025-07-16
Library classification Updated 2025-07-16
Area of law Updated 2025-07-16
Get notifications from Hacker News comments Updated 2025-07-16
Guitarrist Updated 2025-07-16
Graphviz Updated 2025-07-16
Form of government Updated 2025-07-16
Rasselas Prince of Abyssinia CHAPTER VIII www.gutenberg.org/cache/epub/652/pg652-images.html:
Oppression is, in the Abyssinian dominions, neither frequent nor tolerated; but no form of government has been yet discovered by which cruelty can be wholly prevented. Subordination supposes power on one part and subjection on the other; and if power be in the hands of men it will sometimes be abused. The vigilance of the supreme magistrate may do much, but much will still remain undone. He can never know all the crimes that are committed, and can seldom punish all that he knows.
There are unlisted articles, also show them or only show them.



