Home

lcm6

lcm6 refers to the least common multiple of six integers. It is the six-argument specialization of the general least common multiple (lcm) function. For integers a1, a2, a3, a4, a5, and a6, lcm6(a1, a2, a3, a4, a5, a6) is the smallest positive integer that is a multiple of each ai.

Computation can be done by prime factorization or by iterative application of the binary lcm operation. If

Properties of lcm6 follow from the general lcm. The operation is commutative and associative, so the order

Example: lcm6(8, 12, 9, 5, 7, 14) = 2520, since 2520 is divisible by 8 (2^3), 12 (2^2·3),

Applications include problems requiring a common multiple of six integers, fraction addition with six denominators, and

ai
is
factored
as
ai
=
∏
p_j^{e_{i,j}},
then
lcm6
equals
∏
p_j^{max_i
e_{i,j}}
over
all
primes
p_j
appearing
in
any
ai.
Alternatively,
lcm6
can
be
computed
as
lcm(lcm(lcm(lcm(lcm(a1,
a2),
a3),
a4),
a5),
a6).
of
arguments
does
not
affect
the
result.
In
most
computational
contexts,
if
any
argument
is
zero,
the
value
of
lcm6
is
zero;
otherwise
the
result
is
positive.
Some
mathematical
conventions
treat
zero
in
LCM
differently,
but
the
common
programming
and
number
theory
approach
sets
lcm(0,
x)
=
0
for
x
≠
0.
9
(3^2),
5,
7,
and
14
(2·7).
This
yields
the
maximum
prime
powers
2^3,
3^2,
5,
and
7.
modular
arithmetic.
See
also
LCM
and
the
general
concept
of
the
least
common
multiple.