Given two nonzero natural numbers n and m, the classic relationship holds: It's as simple as it is useful: computer science has efficient algorithms for computing the GCD (e.g. the Euclidean algorithm), and this identity lets us get the LCM "for free":
This relationship between two numbers suggests a natural question: does it generalize to a set of N natural numbers? The answer is yes — but not in the most obvious way one might imagine. Naively replacing the GCD and LCM of the two numbers with the GCD and LCM of the N numbers, keeping the shape of the relationship unchanged, does not work: we'll see this with an explicit counterexample in Section 4. The correct generalization requires a slightly different tool, and one extra ingredient.
Section 1 recalls the classic N=2 case, with a few numerical examples and a direct proof. Section 2 introduces canonical factorization via maximum and minimum exponents, a tool that allows a second — purely algebraic — proof of the same N=2 case. Section 3 uses this tool to prove the correct generalization to N numbers. Section 4 gathers observations, the counterexample showing why the naive generalization fails, and a delicate case related to the nonzero-natural-numbers hypothesis.