Algorithm to compute gcd(a,b) by repeated division: gcd(a,b) = gcd(b, a mod b). Terminates when remainder is 0; the last nonzero remainder is the gcd.. The key formula is gcd(a,b) = gcd(b, a mod b). This concept is typically introduced in College. Understanding this concept builds a strong foundation for more advanced mathematics.