Amicable numbers are two different numbers related in such a way that the sum of the proper divisors of each is equal to the other number.

The smallest pair of amicable numbers is (164, 1E8). They are amicable because the proper divisors of 164 are 1, 2, 4, 5, X, E, 18, 1X, 38, 47 and 92, of which the sum is 1E8; and the proper divisors of 1E8 are 1, 2, 4, 5E and EX, of which the sum is 164. (A proper divisor of a number is a positive factor of that number other than the number itself. For example, the proper divisors of 6 are 1, 2, and 3.)

A pair of amicable numbers constitutes an aliquot sequence of period 2.  It is unknown if there are infinitely many pairs of amicable numbers.

A related concept is that of a perfect number, which is a number that equals the sum of its own proper divisors, in other words a number which forms an aliquot sequence of period 1. Numbers that are members of an aliquot sequence with period greater than 2 are known as sociable numbers.

The first ten amicable pairs are: (164, 1E8), (828, 84X), (1624, 1838), (2XX4, 3278), (3734, 3828), (6274, 6348), (7139, 8543), (X014, X7X8), (30578, 38044), and (32894, 32928).

## Rules for generation

While these rules do generate some pairs of amicable numbers, many other pairs are known, so these rules are by no means comprehensive.

In particular, the two rules below produce only even amicable pairs, so they are of no interest for the open problem of finding amicable pairs coprime to 156 = 2·3·5·7, while over 6E4 pairs coprime to 26 = 2·3·5 are known.

It states that if:

• p = 3 × 2n - 1 - 1,
• q = 3 × 2n - 1,
• r = 9 × 22n - 1 - 1,

where n > 1 is an integer and p, q, and r are prime numbers, then 2n × p × q and 2n × r are a pair of amicable numbers. This formula gives the pairs (164, 1E8) for n = 2, (X014, X7X8) for n = 4, and (31768X8, 31E1314) for n = 7, but no other such pairs are known. Numbers of the form 3 × 2n - 1 are known as Thabit numbers. In order for Ibn Qurra's formula to produce an amicable pair, two consecutive Thabit numbers must be prime; this severely restricts the possible values of n.

To establish the theorem, Thâbit ibn Qurra proved nine lemmas divided into two groups. The first three lemmas deal with the determination of the aliquot parts of a natural integer. The second group of lemmas deals more specifically with the formation of perfect, abundant and deficient numbers.