2. Canonical Factorization: GCD and LCM via Exponents
Here we introduce the tool needed for the generalization to N numbers in Section 3, already presenting it in its general form (not just for N=2), so Section 3 can reuse it without redefining it.
Given N nonzero natural numbers a₁,…,aN, each factors uniquely into primes. Let F={f₁,…,fK} be the set of all prime factors appearing in at least one of the factorizations (common and uncommon together). Then each ai is uniquely written as
where some exponents eij may be zero (the factor fj doesn't appear in the factorization of ai). From here, the GCD and LCM of N numbers can conveniently be defined as:
Observation 1
If a factor fj is not common to all the ai, its minimum exponent is 0, so it doesn't appear in the factorization of the GCD — exactly the classical criterion "the GCD is computed only over common factors." This max/min definition is therefore equivalent to the school-textbook one, just more convenient to manipulate algebraically, since it treats all factors (common and not) uniformly instead of distinguishing them case by case.
Using these definitions with N=2, let's re-prove Theorem 1 in a purely algebraic way.
Alternative proof. Let c₁,…,ck be the factors common to n and m, with exponents en,α and em,α respectively, and let un,1,…,un,i and um,1,…,um,j be the uncommon factors of n and m respectively. Then
Multiplying side by side and using the identity min(x,y)+max(x,y)=x+y on each common exponent:
This recovers Theorem 1 by purely algebraic means — a confirmation of the consistency between the two proofs.
∎