You thought you knew everything about integers, especially their divisors. For example, the divisors of 12 are 1, 2, 3, 4, 6 and 12; its proper divisors are 1, 2, 3, 4 and 6 (but not 12). Let S(n) denote the function giving the sum of the proper divisors of n. Thus, S(12) = 1 + 2 + 3 + 4 + 6 = 16.
But have you heard of amicable numbers?
Two integers n and m are friends (or amicable) if S(n) = m and S(m) = n. Under this definition, the integers n and m may be equal. For example, 6 is friends with itself because its proper divisors are 1, 2 and 3, whose sum is indeed 6 (S(6) = 6). Another famous pair of friendly integers is (220, 284). Indeed:
S(220) = 1 + 2 + 4 + 5 + 10 + 11 + 20 + 22 + 44 + 55 + 110 = 284 and S(284) = 1 + 2 + 4 + 71 + 142 = 220.
By contrast, 10 and 40 do not form an amicable pair because S(10) = 1 + 2 + 5 = 8 (not 40) and S(40) = 1 + 2 + 4 + 5 + 8 + 10 + 20 = 50 (not 10).