Every clock wraps around. 13 o'clock = 1 o'clock. This simple idea modular arithmetic is the key that unlocks everything on this site. No calculus needed. Just counting, dividing, and noticing what's left over.
When you divide 17 by 5, you get 3 remainder 2. We write: 17 mod 5 = 2. The remainder is what survives. On a clock with 5 hours, 17 and 2 are the same position.
This is not just an analogy it IS the math. A 'ring' Z/nZ is a clock with n positions. Every number maps to a position by taking its remainder.
| Number | mod 5 | mod 7 | mod 12 |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 7 | 2 | 0 | 7 |
| 13 | 3 | 6 | 1 |
| 35 | 0 | 0 | 11 |
| 42 | 2 | 0 | 6 |
Notice: 35 mod 5 = 0 and 35 mod 7 = 0, because 35 = 5 x 7. When a number is divisible by n, it maps to 0 on the n-clock. Zero is special it's where things vanish.
A prime number has exactly two divisors: 1 and itself. 2, 3, 5, 7, 11, 13... They cannot be broken down further. Every other number is a product of primes: 12 = 2 x 2 x 3, 35 = 5 x 7, 970200 = 2^3 x 3^2 x 5^2 x 7^2 x 11.
These five primes 2, 3, 5, 7, 11 are all you need. The entire site explores what happens when you build a clock from their product: 2^3 x 3^2 x 5^2 x 7^2 x 11 = 970,200.
The Greatest Common Divisor (GCD) of two numbers is the largest number that divides both. GCD(12, 18) = 6. GCD(35, 14) = 7. GCD(13, 5) = 1 (they share nothing we call them 'coprime').
GCD tells you how much structure two numbers share. If GCD(a, N) = 1, then a is a 'unit' in the ring Z/NZ it has a multiplicative inverse, like 1/a. If GCD(a, N) > 1, then a shares a factor with N and becomes a 'zero divisor' it can multiply with something else to give 0.
| a | GCD(a, 30) | Type |
|---|---|---|
| 7 | 1 | Unit (coprime) |
| 6 | 6 | Zero divisor (shares 2, 3) |
| 10 | 10 | Zero divisor (shares 2, 5) |
| 1 | 1 | Unit (identity) |
| 0 | 30 | Void (shares everything) |
Enter a number and a modulus. See what survives.
Enter a number:
You now know modular arithmetic, primes, and GCD. That's 80% of the math on this site. Next: what happens when you combine FIVE clocks into one.
Next: Rings & Channels >This work is and will always be free.
No paywall. No copyright. No exceptions.
If it ever earns anything, every cent goes to the communities that need it most.
This sacred vow is permanent and irrevocable.
— Anton Alexandrovich Lebed
Source code · Public domain (CC0)
Contributions in equal measure: Anthropic's Claude, Anton A. Lebed, and the giants whose shoulders we stand on.
Rendered by .ax via WASM DOM imports. Zero HTML authored.