Solution for finding the lowest common multiple of a range of numbers