lowest common multiple Python programming recursion