← Minton Analytics The Beauty of Mathematics. The Power of Data.

Collatz orbits, seen through mod 3

Two structural facts drive this page. First: every 3n+1 step lands on a number that is 1 mod 3, and every halving after that flips 1 ↔ 2 mod 3 — so once you take a single odd step, the orbit alternates between two residue classes forever and can never touch a multiple of 3 again. Second: the moment an orbit hits a power of 2, it stops doing anything interesting and free-falls straight to 1. Every trajectory ends this way.

The orbit, term by term

Each term is colored by its residue mod 3. A dashed border means the term is odd (the next step is 3n+1); a solid ring marks a power of 2. Everything from that ring onward sits on a tinted background — that is the free fall, pure halving all the way down.

≡ 0 mod 3 (multiples of 3 — prefix only) ≡ 1 mod 3 ≡ 2 mod 3 power of 2 dashed = odd term

Trajectory (log scale)

Same orbit plotted by step. Dot color is the residue class; the shaded band is the free fall after the first power of 2.

Table view — every term, with its residue
StepOperationValuemod 3Note

Why the classes behave this way

The whole residue story is this three-state machine. Class 0 is a one-way door: halving keeps you inside it, but the first odd step ejects you to class 1 and nothing ever sends you back — 3n+1 is always ≡ 1, never ≡ 0. After that, halving just toggles 1 ↔ 2 and odd steps reset you to 1.

Which power of 2 catches you?

A thing worth chasing from here: since every orbit ends by landing on a power of 2, the Collatz conjecture is exactly the claim that for every n, some iterate of the map is a power of 2. Notice how few distinct powers of 2 actually get used as entry points — 16 does an enormous amount of the work, because 5 → 16 and every orbit that reaches 5 is already finished.

The on-ramp: how almost everything gets to 16

16 has exactly one door, and it is 5 — arriving from 32 would mean you had already hit a power of 2. So every orbit that enters the powers of 2 at 16 got there by sliding down the 5-ladder. Below, the river is that slide, drawn with its thickness proportional to how much traffic it carries. Every step along the trunk is a halving; every arrow joining it is a single 3n+1 step.

Do the two doors settle down?

Everything above is measured over a range you can drag. This one is not: it asks whether the shares converge, which needs starting values far past anything a browser can walk through live. The figures below were computed once, over every starting value up to 100 million, and are fixed in the page — the scan slider does not affect this chart.

reach the ladder through 13 through 53 never reach it at all
Through 13
47.60%
at 100 million
Through 53
45.54%
at 100 million
Never reach the ladder
6.23%
at 100 million

Table view — the measured shares
Starts scannedvia 13via 53never

One level further back: how you reach 13 and 53

Ask the same question again of 13 and of 53, and the answer is sharper than it was for 16. Each has a single dominant door — 17 brings 96.8% of everything that reaches 13, and 35 brings 98.8% of everything that reaches 53 — and one more step back gives 11 and 23. Two highways, running side by side until they merge at 40. Everything past that point is the river from the section above, drawn here as a single arrow rather than repeated.

width = share of orbits carrying through door that is a multiple of 3 — structurally real, effectively empty

Which x · power of 2 catches you?

Every positive integer is an odd number times a power of 2 — its odd part times 2k. So the ladders x·2k, one for each odd x, tile the whole number line: every value sits on exactly one of them, and the powers of 2 above are simply the ladder whose odd part is 1. Halving walks you down your own ladder; 3n+1 throws you onto a different one. Drag x to see which rungs of each ladder actually have a door.

Busiest doorway
—
Never reach this ladder
—
of all orbits scanned
Why

Mod 18: the whole map at once

18 = 2 × 9, and that is exactly what you need: the 9 tracks where you are, the 2 tracks which move you take. Odd steps are fully determined mod 18 — but halving is not, because n ≡ 2 (mod 18) means n/2 is 1 or 10 depending on a bit you can't see. So every even residue has two successors, one even and one odd: at each even step it is a coin flip whether you keep sliding or get flung. All 27 edges are below. Node size is how often orbits actually sit in that residue.

even — halves, two ways out odd — one way out, 3n+1 thin arc = ÷2  ·  heavy chord = 3n+1
follows the starting number set at the top of the page

The same orbit, as a walk through the 18 residues

One lane per residue, ordered around the halving ring rather than 0–17. A run of halvings walks steadily down the lanes and then wraps back to the top — the ring is a cycle, so any linear axis has to break it somewhere — and every 3n+1 is a jump back to the 16 or 4 lane. The six italic lanes at the bottom are the multiples of 3: an orbit can only ever start there, never arrive.

Every question this page answers rests on one it cannot. The congruence rules — mod 3, mod 9, mod 18 — say precisely which doors exist; they say nothing about how much traffic goes through them. Nearly half of all orbits pass through 13, nearly half through 53, and no argument here explains why those two — or why the shares settle where they do. That is where the arithmetic stops and the counting begins.

Minton Analytics Beautiful Mathematics Runs entirely in your browser — nothing is sent anywhere.