Number Theory Level 9: GCD (small, <= 30). Euclidean algorithm.
1. First Euclid step
Replace the pair with divisor and remainder.
Replace the larger number with its remainder.
2. Repeat with remainder
First Euclid step
Continue until the smaller number divides exactly.
3. Read GCD
First Euclid step
Repeat with remainder
The last nonzero divisor is the GCD.