Examples of finding gcd and lcm
What are gcd(120,500) and lcm(120,500)?
gcd(120,500) = 2min(3,2) * 3min(1,0) * 5min(1,3) = 22 * 30 * 51 = 20
lcm(120,500) = 2max(3,2) * 3max(1,0) * 5max(1,3) = 23 * 31 * 53 = 3000
Theorem. Let a and b be be positive integers. Then