least_common_multiple

mathtools.least_common_multiple(*integers)

Gets least common multiple of positive integers.

>>> mathtools.least_common_multiple(2, 4, 5, 10, 20)
20
>>> mathtools.least_common_multiple(4, 4)
4
>>> mathtools.least_common_multiple(4, 5)
20
>>> mathtools.least_common_multiple(4, 6)
12
>>> mathtools.least_common_multiple(4, 7)
28
>>> mathtools.least_common_multiple(4, 8)
8
>>> mathtools.least_common_multiple(4, 9)
36
>>> mathtools.least_common_multiple(4, 10)
20
>>> mathtools.least_common_multiple(4, 11)
44

Returns positive integer.