Amicable numbers

Amicable numbers are two different numbers so related that the sum of the proper divisors of each is equal to the other number. 

See “proper divisor”

The smallest pair of amicable numbers is (220, 284).

They are amicable because the proper divisors of 220 are 1, 2, 4, 5, 10, 11, 20, 22, 44, 55 and 110, of which the sum is 284;

and

the proper divisors of 284 are 1, 2, 4, 71 and 142, of which the sum is 220.

The next amicable number is (1184, 1210). Therefore there is only one amicable number from 0 to 1000.