Start with a finite sequence a1, a2, . . . , an of positive
integers. If possible, choose two indices j < k such
that aj does not divide ak, and replace aj and ak by
gcd(aj , ak) and lcm(aj , ak), respectively. Prove that if
this process is repeated, it must eventually stop and the
final sequence does not depend on the choices made.
(Note: gcd means greatest common divisor and lcm
means least common multiple.)