Mathematical playground Computation verifies only the displayed finite range. The gravity-well view is a chosen coordinate system, not evidence that every positive integer reaches 4–2–1.

For a positive integer $n$, the Collatz map is

\[T(n)=\begin{cases} n/2 & \text{if } n \text{ is even},\\ 3n+1 & \text{if } n \text{ is odd}. \end{cases}\]

The rule is local and simple; its repeated behavior is not. Try a starting value, then compare three views of the same dynamics.

Simulator

Follow one integer

Run all the way to 1, or advance one application of $T$ at a time.

Current value27
Steps shown0
Peak27
Plot 01 · The rule

One step over the naturals

Each point is $(n,T(n))$. The two straight branches are sampled on alternating integers.

Plot 02 · The iteration

Trajectories of the first 50 primes

Here the horizontal axis is iteration $k$, and each colored path is $(k,T^k(p))$ for one prime $p$.

Paths50
Longest path
Highest peak

Hover a path to identify its starting prime. The log scale keeps small trajectories visible beside the larger excursions.

Plot 03 · A chosen potential

A Collatz gravity well?

Every displayed state is placed at a radius determined by how many steps remain before it first reaches the cycle $C=\{1,2,4\}$.

Distinct states
Deepest layer
Reached the cycle
Define $\tau_C(n)=\min\{k\geq 0:T^k(n)\in C\}$. On the finite basin shown here, $\tau_C(T(n))=\tau_C(n)-1$ outside $C$: every non-cycle edge descends one layer toward the center.

So is 4–2–1 gravitational? It is an attractor for every starting value computed here, and $\tau_C$ makes that attraction visible. But “gravity” comes from the coordinate choice. Extending the observation to every positive integer would be the Collatz conjecture itself.