prime-number-theorem by Ciro Santilli 40 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:
sudo apt intsall bsdgames
cd prime-number-theorem
./main.py 100000000
Runs in 30 minutes tested on Ubuntu 22.10 and P51, producing:
Figure 1.
Linear vs approximation plot
. and are added to give a better sense of scale. is too close to 0 and not visible, and the approximation almost overlaps entirely with .
Figure 2.
. It is clear that the difference diverges, albeit very slowly.
Figure 3.
. 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:
(* 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}};
so OK, it is not something doable on a personal computer just like that.
The Best Illusion of the Year Contest is an annual competition that showcases and celebrates innovative optical illusions created by artists, researchers, and enthusiasts from around the world. Established in 2005, the contest is typically organized by the Neural Correlate Society and aims to highlight the intersection of art and science, particularly in the realm of visual perception. Participants submit their original illusions, which can involve a variety of techniques and concepts to manipulate how we perceive visual information.
A gravitational mirage, more commonly referred to as gravitational lensing, is a phenomenon that occurs when the gravitational field of a massive object, such as a galaxy or cluster of galaxies, distorts the light from objects that are located behind it. This effect arises from the predictions of Einstein's General Theory of Relativity, which posits that mass can curve spacetime. When light from a distant star or galaxy passes near a massive object, the object's gravity bends the light's path.
Operations Research (OR) awards are recognitions given to individuals or teams for significant contributions to the field of operations research, which involves the application of advanced analytical methods to help make better decisions. These awards can recognize various aspects of the field, including research papers, innovative methodologies, applications of OR techniques in real-world problems, and contributions to the education and practice of operations research.
The Government Operational Research Service (GORS) is a part of the UK government that employs operational research (OR) principles to inform and enhance decision-making within public sector organizations. GORS is focused on applying analytical and quantitative methods to complex problems in areas such as policy development, resource allocation, and service delivery.
Johnson's rule is a scheduling algorithm used to minimize the makespan (the total time required to complete a set of jobs) in a flow shop environment where there are two machines. It helps in determining the optimal order of jobs to be processed on these machines. The basic steps of Johnson's rule are as follows: 1. **List all jobs**: Create a list of all jobs along with their processing times on the two machines (Machine 1 and Machine 2).
Lorna Swain could refer to different subjects depending on the context, as there may be multiple individuals with that name or it could be a term used in specific contexts like literature or pop culture. Without additional information, it’s difficult to provide a precise answer.
Factory Physics is a discipline that applies principles from physics and systems engineering to understanding and improving manufacturing systems and processes. It integrates concepts from various fields such as operations management, industrial engineering, and system dynamics to provide a scientific basis for decision-making in manufacturing environments. The key ideas behind Factory Physics include: 1. **Flow Principles**: Factory Physics emphasizes the flow of materials and information within manufacturing systems.
The "knee of a curve" refers to a point on a graph, typically associated with a plot of two variables, where there is a noticeable change in the slope or curvature of the graph. This point often indicates a transition from one behavior or trend to another. In various contexts, it can represent: 1. **Performance vs.
Management science is an interdisciplinary field that focuses on the application of analytical methods to solve complex organizational problems and improve decision-making processes. It combines techniques from various disciplines, such as mathematics, statistics, economics, and computer science, along with principles from business and management theory. Key components of management science include: 1. **Quantitative Analysis**: Utilizing mathematical and statistical techniques to analyze data and inform decisions. This often involves operations research, linear programming, simulations, and forecasting.
The term "shadows" can refer to several concepts depending on the context: 1. **Physical Shadows**: In physics and everyday life, shadows are dark areas created when an opaque object blocks light from a source, such as the sun or an artificial light. The shape and intensity of a shadow depend on the object's shape, the position of the light source, and the surface on which the shadow falls.
In operations research (OR), "Sigma" often refers to the concept of "sigma" in the context of statistical analysis and quality control, particularly in Six Sigma methodologies. Here are some key points about Sigma in operations research: 1. **Statistical Significance**: In statistics, "sigma" (σ) typically represents the standard deviation of a population, which measures the amount of variation or dispersion in a set of values.
Chatoyancy, often referred to as "cat's eye effect," is an optical phenomenon seen in certain gemstones and materials that exhibit a bright, narrow band of reflected light. This effect resembles the slit eye of a cat, hence the name. Chatoyancy occurs due to the presence of fibrous inclusions or parallel needle-like structures within the gemstone, which reflect light in a specific way.
The Imbert–Fedorov effect is an optical phenomenon observed in the context of the interaction between polarized light and certain types of optical materials. Specifically, it refers to the change in the angular momentum of light when it passes through a birefringent medium, which causes the light beams to change their polarization state and spatial propagation direction.
Optical illusions are fascinating images or visual phenomena that trick the brain into seeing something that isn't there, seeing something differently than it actually is, or experiencing a change in perception based on the way the image is presented. Here is a list of various types of optical illusions: ### 1. **Geometric Illusions** - **Müller-Lyer Illusion:** Lines of equal length appear to be different lengths due to the arrow-like designs at the ends.
The term "Shadow" can refer to different concepts depending on the context. Here are a few common interpretations: 1. **Physical Shadow**: A shadow is a dark area or shape produced by a body coming between rays of light and a surface. This is a basic principle of optics and can be observed when an object blocks light from reaching a surface, such as the ground or a wall.
An aplanatic lens is a type of optical lens specifically designed to minimize spherical aberration and coma, which are common optical aberrations that can distort images. The term "aplanatic" generally refers to lenses that are engineered to provide a point of focus where light converges more accurately, leading to clearer and more defined images.

Pinned article: Introduction to the OurBigBook Project

Welcome to the OurBigBook Project! Our goal is to create the perfect publishing platform for STEM subjects, and get university-level students to write the best free STEM tutorials ever.
Everyone is welcome to create an account and play with the site: ourbigbook.com/go/register. We belive that students themselves can write amazing tutorials, but teachers are welcome too. You can write about anything you want, it doesn't have to be STEM or even educational. Silly test content is very welcome and you won't be penalized in any way. Just keep it legal!
We have two killer features:
  1. topics: topics group articles by different users with the same title, e.g. here is the topic for the "Fundamental Theorem of Calculus" ourbigbook.com/go/topic/fundamental-theorem-of-calculus
    Articles of different users are sorted by upvote within each article page. This feature is a bit like:
    • a Wikipedia where each user can have their own version of each article
    • a Q&A website like Stack Overflow, where multiple people can give their views on a given topic, and the best ones are sorted by upvote. Except you don't need to wait for someone to ask first, and any topic goes, no matter how narrow or broad
    This feature makes it possible for readers to find better explanations of any topic created by other writers. And it allows writers to create an explanation in a place that readers might actually find it.
    Figure 1.
    Screenshot of the "Derivative" topic page
    . View it live at: ourbigbook.com/go/topic/derivative
  2. local editing: you can store all your personal knowledge base content locally in a plaintext markup format that can be edited locally and published either:
    This way you can be sure that even if OurBigBook.com were to go down one day (which we have no plans to do as it is quite cheap to host!), your content will still be perfectly readable as a static site.
    Figure 2.
    You can publish local OurBigBook lightweight markup files to either https://OurBigBook.com or as a static website
    .
    Figure 3.
    Visual Studio Code extension installation
    .
    Figure 4.
    Visual Studio Code extension tree navigation
    .
    Figure 5.
    Web editor
    . You can also edit articles on the Web editor without installing anything locally.
    Video 3.
    Edit locally and publish demo
    . Source. This shows editing OurBigBook Markup and publishing it using the Visual Studio Code extension.
    Video 4.
    OurBigBook Visual Studio Code extension editing and navigation demo
    . Source.
  3. https://raw.githubusercontent.com/ourbigbook/ourbigbook-media/master/feature/x/hilbert-space-arrow.png
  4. Infinitely deep tables of contents:
    Figure 6.
    Dynamic article tree with infinitely deep table of contents
    .
    Descendant pages can also show up as toplevel e.g.: ourbigbook.com/cirosantilli/chordate-subclade
All our software is open source and hosted at: github.com/ourbigbook/ourbigbook
Further documentation can be found at: docs.ourbigbook.com
Feel free to reach our to us for any help or suggestions: docs.ourbigbook.com/#contact