saurabhgayali/prime-number-distribution-explorer — explained in plain English
Analysis updated 2026-05-18
Explore how prime number density decreases as numbers grow larger.
Generate and export lists of prime numbers up to ten million as CSV.
Teach or learn the Prime Number Theorem through an interactive chart.
| saurabhgayali/prime-number-distribution-explorer | 100/rutgers-pbl-dining-2015 | a15n/a15n_old | |
|---|---|---|---|
| Stars | 0 | — | — |
| Language | HTML | HTML | HTML |
| Last pushed | — | 2015-12-01 | 2016-06-18 |
| Maintenance | — | Dormant | Dormant |
| Setup difficulty | easy | easy | easy |
| Complexity | 1/5 | 1/5 | 1/5 |
| Audience | general | general | general |
Figures from each repo's GitHub metadata at analysis time.
Prime Number Distribution Explorer is a single-page web app for visualizing how prime numbers are spread out as numbers get larger. It uses the Sieve of Eratosthenes, a classic method for finding prime numbers, to generate primes up to ten million and then shows the reader how their density changes across that range. The app is built with plain HTML, Tailwind CSS pulled in from a content delivery network, Chart.js for the charts, and vanilla JavaScript, with no backend or installation step involved. A person can open the index.html file directly in a modern browser and start exploring. Users can adjust the upper search limit and the size of the interval windows used to group numbers, search among the first 500 indexed primes, and switch between light and dark themes. The project ties its visuals back to a real math concept called the Prime Number Theorem, which describes how the probability that a number near a given value x is prime is approximately one divided by the natural log of x. Rather than just stating the formula, the app lets someone watch that decreasing density happen on screen while also seeing the local unevenness in exactly where primes fall. Results can be exported as PNG or SVG images for the chart, and as CSV files for either the complete list of generated primes or the summarized interval statistics. To keep things responsive even at ten million numbers, the app automatically widens the interval size for very large ranges so the chart does not try to render too many points at once. The README lists possible future additions such as prime gap visualization, an Ulam spiral view, and twin prime highlighting, though these are not built yet. The project is released under the MIT license and the author frames it as an educational tool aimed at students, educators, and anyone curious about number theory.
An interactive browser app that visualizes how prime number density changes as numbers grow, using the Sieve of Eratosthenes and live charts.
Mainly HTML. The stack also includes HTML, JavaScript, Tailwind CSS.
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly general.
This repo across BitVibe Labs
double-check against the repo, no cap.