Euclidean Algorithm
The Euclidean algorithm finds the greatest common divisor by repeatedly replacing the larger number with the remainder of the division, until the remainder is zero.
LaTeX
\gcd(a,b)=\gcd(b,\ a\bmod b),\qquad \gcd(a,0)=aVariables
- remainder when a is divided by b
Example
Find .
- .
- .
- .
Answer: .