# lcm -- least common multiple

## Synopsis

• Usage:
lcm(x,y,...)
• Inputs:
• x, , all the elements should be integers, rational numbers or ring elements
• Outputs:
• m, , the least common multiple of the elements x,y,...

## Description

 i1 : lcm(-6,15,14) o1 = 210 i2 : lcm(-6/7,15,14) o2 = 210 o2 : QQ i3 : R = QQ[a..d]; i4 : lcm(a^2-d^2,(a-d)*(b+c)) 2 2 2 2 o4 = a b + a c - b*d - c*d o4 : R i5 : factor oo o5 = (b + c)(a - d)(a + d) o5 : Expression of class Product

• gcd -- greatest common divisor

## Ways to use lcm :

• "lcm(List)"
• "lcm(QQ,QQ)"
• "lcm(QQ,ZZ)"
• "lcm(RingElement,RingElement)"
• "lcm(RingElement,ZZ)"
• "lcm(Sequence)"
• "lcm(ZZ,QQ)"
• "lcm(ZZ,RingElement)"
• "lcm(ZZ,ZZ)"
• lcm(MonomialIdeal) -- least common multiple of all minimal generators

## For the programmer

The object lcm is .