LCM

LCM[n1,n2,]

gives the least common multiple of the ni.

Details

  • Integer mathematical function, suitable for both symbolic and numerical manipulation.
  • LCM works with ordinary and Gaussian integers.
  • LCM works not only with integers but also with rational numbers, both real and complex.
  • For rational numbers ri, LCM[r1,r2,] gives the least rational number r for which all the r/ri are integers.
  • LCM automatically threads over lists.
  • LCM has attributes Flat and Orderless.

Examples

open allclose all

Basic Examples  (2)

Least common multiple of three integers:

In[1]:=
Click for copyable input
Out[1]=

Plot the LCM for a number with 1000:

In[1]:=
Click for copyable input
Out[1]=

Scope  (4)

Applications  (6)

Properties & Relations  (6)

Possible Issues  (2)

Neat Examples  (2)

See Also

GCD  PolynomialLCM  ExtendedGCD

Tutorials

Introduced in 1988
(1.0)
| Updated in 1999
(4.0)