Euclidean algorithm
Finds the greatest common divisor by repeated division. History: c. 300 BC.
How to work it out
- 1
The statement:
- 2
Finds the greatest common divisor by repeated division.
- 3
Below, the numbers in the table are computed by this site from the definition, not copied.
LaTeX source of the formulas on this page
\[ \gcd(a, b) = \gcd(b,\ a \bmod b) \]
gcd(1071, 462) step by step (computed)
| Step | a | b | a mod b |
|---|---|---|---|
| 1 | 1071 | 462 | 147 |
| 2 | 462 | 147 | 21 |
| 3 | 147 | 21 | 0 |
Questions
What is the euclidean algorithm?
Finds the greatest common divisor by repeated division.
Who is the Euclidean algorithm associated with?
Euclid.