1. m(3, 5) = 3 m(7, 5) = m(2, 5) = 2 m(14, 5) = m(9, 5) = m(4, 5) = 4 m(a, b) = a mod b 2. gcd(15, 9) = gcd(9, 6) = gcd(6, 3) = gcd(2, 0) = 2 gcd(13, 8) = gcd(8, 5) = gcd(5, 3) = gcd(3, 2) = gcd(2, 1) = gcd(1, 0) = 1 3. def power(b, n): if n == 0: return 1 else: return b * power(b, n - 1) 4. double(3) = double(2) + double(2) = double(1) + double(1) + double(1) + double(1) = double(0) + double(0) + double(0) + double(0) + double(0) + double(0) + double(0) + double(0) = 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 = 8 double(n) = 2^n def double(n): if n == 0: return 1 else: return 2 * double(n - 1) 5. f(3) = f(10) = f(5) = f(16) = f(8) = f(4) = f(2) = f(1) = 1 f(7) = f(22) = f(11) = f(34) = f(17) = f(52) = f(26) = f(13) = f(40) = f(20) = f(10) = f(5) = f(16) = f(8) = f(4) = f(2) = f(1) = 1 We don't know if there are any positive integers x so that f(x) results in an infinite loop. For every x we have ever tried, f(x) terminates with an answer of 1.