Added least common multiple algorithm