Two numbers are said to be 'amicable' or 'friends' if the sum of the divisors of the first is equal to the second, and viceversa. For example, the divisors of 220 are: 1, 2, 4, 5, 10, 11, 20, 22, 44, 55, 110 which sums up 284. 284 divisors are 1, 2, 4, 71 and 142, which sums 220, thus 220 and 284 are friends. Write a function which returns either true of false if a number is a friend of other number.
Examples:
friend(220) ==> true
friend(7) ==> false
friend(284) ==> true
Function with least number of chars wins.
NOTE: I just found out that there is a similar question, but I believe this one is simpler and perhaps more general.