Every factor of N comes in a pair. Let's see why the pairs mirror around √N.
Watch the pairs of 12 appear...
The key insight: every factor pair (a, b) with a × b = N has one factor ≤ √N and one factor ≥ √N.
So walking 1 → √N catches BOTH halves of every pair. Past √N, you'd just re-find them.
Step 2 of 4 · List factors of 72
72
√72 ≈ 8.5 — test 1 through 8.
all factors of 72 (sorted)1, 2, 3, 4, 6, 8, 9, 12, 18, 24, 36, 72
Step 3 of 4 · List factors of 120
120
√120 ≈ 10.9 — test 1 through 10.
all factors of 120 (sorted)1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 24, 30, 40, 60, 120