Skip to content

LCM

LCM[n1, n2, ...] finds the least common multiple of the inputs.

Attributes[LCM] := {Flat, Listable, OneIdentity, Orderless, Protected}

Simple examples

In[1]:= LCM[5, 14]
Out[1]= 70
In[2]:= LCM[5, 14, 68]
Out[2]= 2380
In[3]:= LCM[(2)/(3), (1)/(3)]
Out[3]= (2)/(3)
In[4]:= LCM[(2)/(3), (1)/(3), (5)/(6)]
Out[4]= (10)/(3)
In[5]:= LCM[(2)/(3), (1)/(3), (5)/(6), 3]
Out[5]= 30
In[6]:= LCM[(2)/(3), {(1)/(3), (5)/(6), 3}]
Out[6]= {(2)/(3), (10)/(3), 6}