Collatz Chattie
Iterate, compare trajectories, and turn stopping time into a gravity well.
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.
Follow one integer
Run all the way to 1, or advance one application of $T$ at a time.
One step over the naturals
Each point is $(n,T(n))$. The two straight branches are sampled on alternating integers.
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$.
Hover a path to identify its starting prime. The log scale keeps small trajectories visible beside the larger excursions.
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\}$.
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.