Least Common Multiple

The Least Common Multiple, or LCM, is the smallest positive integer that is divisible by two numbers. It is often included in the standard libraries for programming languages. 1

Solution for two or more numbers

LCM can also be used to find the smallest positive integer that is divisible by two or more numbers. In Haskell, this is done by: 1

lcmMultiple numbers = foldl lcm 1 numbers

Footnotes

  1. 20250419072418 2