×

Least Common Multiple

The least common multiple of a set of integers is the smallest (positive) number which is a multiple of each integer in the set. We denote this value as $$\mbox{lcm}(a, b, \ldots)$$.

If the prime factorizations of $$a$$ and $$b$$ are

\begin{align} a & = p_1 ^{\alpha_1} p_2 ^{\alpha_2} \ldots p_k ^{\alpha_k}, \\ b & = p_1 ^{\beta_1} p_2 ^ {\beta_2} \ldots p_k ^ {\beta_k}, \\ \end{align}

then the LCM is

$\mbox{lcm}(a,b) = p_1 ^{\max(\alpha_1, \beta_1)} p_2 ^{\max(\alpha_2, \beta_2)} \ldots p_k ^{\max(\alpha_k, \beta_k)}.$

For example: $$\mbox{lcm}(12,18) = \mbox{lcm}(2^2 \cdot 3, 2 \cdot 3^2) = 2^2 \cdot 3^2 = 36$$.

Note by Arron Kau
2 years, 11 months ago