solved problem 5 using a new module I wrote called numerical_analysis, which currently only contains gcd and lcm methods