← Maths

Collatz residue grid

Drag to rotate · cascade ripples · edits never blocked

Animate
Lines
Drag any node left/right — the change cascades through the remaining columns.
shift options carry <n selected wire 1–3 pick shift · green/red floats = decimal→odd
col 0
= 0
0 0 0
0
0 1
0
0 2
0
0 3
0
0 4
0
0 5
0
0 6
0
0 7
0
0 8
0
0 9
0
0 10
0
0 11
0
col 1
= 0
0 0
0
1
0
2
0
3
0
4
0
5
0
6
0
7
0
8
0
9
0
10
0
11
0
col 2
= 0
0 0
0
1
0
2
0
3
0
4
0
5
0
6
0
7
0
8
0
9
0
10
0
11
0
col 3
= 0
0 0
0
1
0
2
0
3
0
4
0
5
0
6
0
7
0
8
0
9
0
10
0
11
0
col 4
= 0
0 0
0
1
0
2
0
3
0
4
0
5
0
6
0
7
0
8
0
9
0
10
0
11
0
col 5
= 0
0 0
0
1
0
2
0
3
0
4
0
5
0
6
0
7
0
8
0
9
0
10
0
11
0
col 6
= 0
0 0
0
1
0
2
0
3
0
4
0
5
0
6
0
7
0
8
0
9
0
10
0
11
0
col 7
= 0
0 0
0
1
0
2
0
3
0
4
0
5
0
6
0
7
0
8
0
9
0
10
0
11
0
col 8
= 0
0 0
0
1
0
2
0
3
0
4
0
5
0
6
0
7
0
8
0
9
0
10
0
11
0
col 9
= 0
0 0
0
1
0
2
0
3
0
4
0
5
0
6
0
7
0
8
0
9
0
10
0
11
0
How interaction works
  1. Rotate the cylinder section left or right (drag, ‹ ›, arrow keys, or keys 13). Each cell is a clipped drum: the whole strip slides and tilts around Y with shiftTotal (like the explainer), while wires still map each top number to its bottom target (end = ((i%4)·3+2)). Red = selected shift option; green dashed = the other two. Overflow wraps inside the column so the section never flies off.
  2. Column settles — residues rewire top→bottom (num = (prev%4)·3 + shift), then the tail “drops to zero” under the edited row.
  3. Cascade — always right→left (left.shift[i] = ⌊num[i]/4⌋). Animate: Instant (no playback), Column (one column per step), or Row (walk downward inside each column). Leading zeros that do not change are skipped; trailing inert zeros jump the highlight to the next column.
  4. Seed n loads base-3 digits into the rightmost column and cascades left instantly (then you can drag from anywhere). Column headers show the odd part of each column’s base-3 value (÷2 until odd), with editable base-3 digits.
  5. Editable base 3 / base 4 — column headers edit ternary digits (0–2); the right panel edits each row’s base-4 digits (0–3 from num % 4). Edits patch the matching nodes only (change / append / delete digits). Clear the field completely, then type again, to rewrite the column or row from scratch. Neighbors update instantly leftward.
  6. Scale — auto-fits on load; use the slider or Fit anytime. Growing cols adds empty columns on the left; growing rows adds empty rows at the bottom.
  7. Drag only changes that node’s shift (0–2). It no longer carries into nodes above.
  8. Right panel — for each row, read num % 4 across columns (left = most significant digit) up through the last non-zero digit as a base-4 integer. If that number ends in 2₄, show the value divided by 2.