def amicable_list(max_n): """ Return the list of amicable numbers up to max_n.""" am_list = [] for n in range(2, max_n+1): divisor_sum = sum(common.get_proper_divisors(n)) if divisor_sum > n: if n == sum(common.get_proper_divisors(divisor_sum)): am_list.append(n) am_list.append(divisor_sum) return am_list