Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Mathematics and Algorithms > Mathematical Functions > Integer Functions >

LCM

LCM[n1, n2, ...]
gives the least common multiple of the ni.
  • 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.
Least common multiple of three integers:
Plot the LCM for a number with 1000:
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]=
LCM threads element-wise over lists:
Use rational arguments:
Use with Gaussian integers:
TraditionalForm formatting:
The LCM of the first 100 integers:
Maximal order of group elements from the symmetric group of order n (Landau's function):
Cumulative LCMs:
Plot the logarithm of the data (if Riemann's hypothesis holds, this grows linearly):
LCMs of Fibonacci numbers:
LCMs of binomial coefficients:
Compare with:
One-argument form:
Compute LCM from factorization:
Use in sums:
Simplify expressions containing LCM:
Reduce inequalities involving LCM:
LCM sorts its arguments:
Signs are discarded:
The arguments must be explicit integers:
Plot the argument of the Fourier transform of the LCMs:
Form LCMs of 1 with rational numbers:
New in 1 | Last modified in 4
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team