# $lcm$ of more than two numbers as a formula of $g$s

It is a common elementary number theory exercise to prove that $lcm(a,b)=gcd(a,b)ab $.

A student might ask what is the $lcm$ of three numbers. Some might think that $lcm(a,b,c)=g(a,b,c)abc $ It isn’t.

Still, one might want a formula for the $lcm$ of three numbers. Of course one can say $lcm(a,lcm(b,c))$. In fact this is the common algorithm for computation. Are they ways to relate $lcm$ and $g$ without nesting those functions together?

Yes, but the formula is not so pretty. $lcm(a,b,c)=g(a,b)g(b,c)g(a,c)abcg(a,b,c) $

This article shows how we can prove this result, and easily infer a more general theorem. First, we see there is a group isomorphism from the naturals to it’s prime factors $f:N→N_{∞}$, $f(p_{1}…p_{n})=(e_{1},…,e_{n},0,0,…)$, where $p_{n}$ is the $n$th prime.

It’s easy to show $lcm(a_{1},a_{2},…,a_{n})g(a_{1},a_{2},…,a_{n}) =f_{−1}(max(f(a_{1}),…,f(a_{n})))=f_{−1}(min(f(a_{1}),…,f(a_{n}))) $ where $max$ and $min$ are defined coordinate-wise. In fact we only need to concern with one single coordinate. So the problem become proving $max(a,b,c)=a+b+c+min(a,b,c)−(min(a,b)+min(b,c)+min(a,c))$, then the formula for $lcm$ of 3 numbers holds.

This look familiar to the inclusion-exclusion principle, and certainly we can use it to prove it and generalize! Let $μ$ be the Lebesgue measure, then for a finite sequence of non-negative reals ${a_{i}}$, $max(a_{1},…,a_{n})=μ(i=1⋃n [0,a_{i}]).$ It’s just some standard arguments to show $max$ does have the inclusion-exclusion structure. It generalize to allow negative reals by simply add a large enough constant to make them positive, and subtract the constant from the result. Formulas for $min,g,lcm$ follows similarly.