LCM[n1,n2,…]
gives the least common multiple of the ni.


LCM
LCM[n1,n2,…]
gives the least common multiple of the ni.
Details

- LCM is also known as smallest common multiple.
- Integer mathematical function, suitable for both symbolic and numerical manipulation.
- LCM[n1,n2,…] is the smallest positive integer that is a multiple of each of the integers n1,n2,….
- For rational numbers ri, LCM[r1,r2,…] gives the least rational number r for which all the r/ri are integers.
- LCM works over Gaussian integers.

Examples
open all close allBasic Examples (2)
Scope (11)
Numerical Evaluation (7)
Symbolic Manipulation (4)
Applications (9)
Basic Applications (4)
Number Theory (5)
Plot the logarithm of the data (if Riemann's hypothesis holds, this grows linearly):
The sum of MangoldtLambda of the first n integers is equal to the natural log of the LCM of the first n integers:
Maximal order of group elements from the symmetric group of order n (Landau's function):
LCMs of binomial coefficients:
Simplify expressions containing LCM:
Properties & Relations (7)
Possible Issues (3)
Tech Notes
Related Guides
Related Links
History
Introduced in 1988 (1.0) | Updated in 1999 (4.0)
Text
Wolfram Research (1988), LCM, Wolfram Language function, https://reference.wolfram.com/language/ref/LCM.html (updated 1999).
CMS
Wolfram Language. 1988. "LCM." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 1999. https://reference.wolfram.com/language/ref/LCM.html.
APA
Wolfram Language. (1988). LCM. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LCM.html
BibTeX
@misc{reference.wolfram_2025_lcm, author="Wolfram Research", title="{LCM}", year="1999", howpublished="\url{https://reference.wolfram.com/language/ref/LCM.html}", note=[Accessed: 13-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_lcm, organization={Wolfram Research}, title={LCM}, year={1999}, url={https://reference.wolfram.com/language/ref/LCM.html}, note=[Accessed: 13-August-2025]}