LOOK CLOSER · CHANGE SOMETHING · ASK WHY

A different view
of the same numbers.

All graphics are computed from the controls—not prerecorded animations. Every visual has a numerical summary, and every experiment has a boundary between what it shows and what it proves.

01 / A broad pattern from local irregularity

Count the primes.
Watch the trend.

π(x) means “the number of primes at most x.” It is a staircase, not the circle constant π. The Prime Number Theorem says π(x)/(x/ln(x)) → 1. The relative discrepancy tends to zero; the absolute discrepancy need not.

Exact sampled π(x)Estimate x / ln(x)
Exact endpoint count
Estimated endpoint count

The endpoint count is exact. Curves connect at most about 200 sampled positions; at large scales they do not draw every individual step. The logarithmic estimate is not a primality test for any one integer.

Deeper note: a better approximation and its limits

The logarithmic integral Li(x) often approximates π(x) more accurately than x/ln(x). It accumulates the changing local density by integration. The Riemann Hypothesis would tightly bound the size of the error, roughly on a square-root scale with logarithmic factors. None of this makes exact individual prime locations follow a simple periodic pattern.

02 / Zoom into a neighborhood

A hundred numbers.
A changing landscape.

Move an inclusive window of exactly 100 integers along the number line. Each green point is prime. Compare 1–100 with 91–190 or a window near 90,000. A lower average density does not mean each successive window has fewer primes.

Read the boundary carefully. The gap summary uses pairs whose two endpoints are inside the window. It cannot measure a gap extending beyond the edges. To find the surrounding primes of one number, use the exact prime analyzer.

03 / Change the geometry

The Ulam spiral.

Write 1 in the center, then walk right, up, left, and down in growing square turns. Highlight the primes. Diagonal patterns appear—not because primes are evenly spaced, but because diagonals sample particular quadratic expressions.

Click a cell, or use the number input to inspect it with a keyboard. The selected cell has a white outline. Number labels appear on the smallest grid.

Do these diagonals predict primes forever?

No. A diagonal can follow a polynomial with an unusually high proportion of prime values over a finite range, but that is not a proof it contains infinitely many primes. Some diagonals have simple divisibility obstructions. Visual prominence is a clue for investigation, not a theorem.

04 / An open question you can test

Can you make it
from two primes?

The strong Goldbach conjecture says every even integer at least 4 is a sum of two primes. Change the target to see every unordered pair for that input. The colored segments add to the same total; repeated primes are allowed.

A related theorem is proved

The weak, or ternary, Goldbach theorem says every odd integer greater than 5 is a sum of three primes. Harald Helfgott proved it in 2013. A proof of that statement does not automatically prove the two-prime version.

Try 10 here: 3 + 7 and 5 + 5 both count, but 7 + 3 is not listed again.

Keep experimenting

Follow the idea
into another view.