Amicable Numbers and Sociable Chains
Meet pairs and loops of numbers whose divisors add up to one another, with checked examples, a classic generating rule and open questions.
Key takeaways
- An amicable pair is two numbers, each the sum of the other's proper divisors, such as 220 and 284.
- Repeating the divisor sum produces an aliquot sequence, which may end at 0, settle on a perfect number or enter a loop.
- A sociable chain is a loop of three or more distinct numbers, though no loop of length three is known.
- Whether there are infinitely many amicable pairs, and where certain sequences end, remain open questions.
Two different numbers are amicable when each equals the sum of the other's proper divisors, the divisors smaller than the number itself. The smallest pair is 220 and 284. The proper divisors of 220 add to 284, and those of 284 add back to 220.
A sociable chain is the longer version. Start with a number, add its proper divisors, repeat on the result, and after several steps you return to where you began. These loops are easy to verify with school arithmetic and surprisingly hard to predict.
Checking the first pair
List the divisors and add.
proper divisors of 220: 1, 2, 4, 5, 10, 11, 20, 22, 44, 55, 110
sum = 284
proper divisors of 284: 1, 2, 4, 71, 142
sum = 220 There is a quicker way. Let σ(n) be the sum of all positive divisors of n. When numbers share no factor, σ of their product is the product of their σ values, and for a prime power σ adds up the powers.
220 = 4 × 5 × 11 σ = 7 × 6 × 12 = 504 504 − 220 = 284
284 = 4 × 71 σ = 7 × 72 = 504 504 − 284 = 220 Both numbers have the same total divisor sum, and that total equals 220 + 284. This is the neatest test of a pair: m and n are amicable exactly when σ(m) = σ(n) = m + n, with m and n different. The method of getting σ from primes is explained in divisors from prime factors.
A little history
The pair 220 and 284 was known to Greek writers of the Pythagorean tradition, who saw it as a symbol of friendship. Medieval scholars in the Islamic world took up the study seriously.
In the ninth century Thabit ibn Qurra found a rule that produces pairs. Later mathematicians rediscovered it in Europe. In the 1600s Pierre de Fermat announced the pair 17,296 and 18,416, and René Descartes announced 9,363,584 and 9,437,056, although both pairs had been reached earlier by scholars writing in Arabic or Persian, at least in the first case.
Leonhard Euler then changed the scale of the subject, using systematic algebraic methods to find dozens of pairs. Even so, a small pair slipped past him and everyone else until 1866, when a young Italian, B. Nicolò I. Paganini, reported 1184 and 1210.
1184 = 32 × 37 σ = 63 × 38 = 2394
1210 = 2 × 5 × 121 σ = 3 × 6 × 133 = 2394
1184 + 1210 = 2394 Thabit's rule
Pick a whole number n greater than 1 and form three numbers.
p = 3 × 2ⁿ⁻¹ − 1
q = 3 × 2ⁿ − 1
r = 9 × 2²ⁿ⁻¹ − 1 If all three are prime, then 2ⁿ × p × q and 2ⁿ × r are amicable.
| n | p, q, r | All prime? | Pair |
|---|---|---|---|
| 2 | 5, 11, 71 | yes | 220 and 284 |
| 3 | 11, 23, 287 | no, 287 = 7 × 41 | none |
| 4 | 23, 47, 1151 | yes | 17,296 and 18,416 |
The next success after n = 4 is n = 7, which gives Descartes's pair. After that the rule goes quiet for as far as people have checked closely. It captures only a thin slice of all amicable pairs, much as a single recipe captures only some of the primes.
Aliquot sequences
Write s(n) = σ(n) − n for the sum of the proper divisors. Applying s again and again gives the aliquot sequence of n. ("Aliquot part" is an old term for a proper divisor.)
12 → 16 → 15 → 9 → 4 → 3 → 1 → 0
95 → 25 → 6 → 6 → 6 → ...
220 → 284 → 220 → ... The first sequence reaches a prime, then 1, then 0. The second falls into the perfect number 6 and stays. The third cycles between two amicable partners. A perfect number is therefore a loop of length one, and an amicable pair is a loop of length two.
Sociable chains
In 1918 the Belgian mathematician Paul Poulet reported two loops longer than a pair. The shorter has five members.
12,496 → 14,288 → 15,472 → 14,536 → 14,264 → 12,496 You can check any step from the factorization. For the last one, 14,264 = 8 × 1783, where 1783 is prime. So σ = 15 × 1784 = 26,760, and 26,760 − 14,264 = 12,496. The loop closes.
Poulet's second example starts at 14,316 and takes 28 steps to return. Computer searches have since found many loops of length four, a smaller number of other lengths, and no loop of length three. Nobody has proved that a three-cycle is impossible.
Where do the sequences go?
An old conjecture, associated with Eugène Catalan and later L. E. Dickson, says that every aliquot sequence either ends at 0 or becomes periodic. Others, notably Richard Guy and John Selfridge, argued that some sequences probably grow without bound. The question is unsettled.
The smallest starting number whose fate is unknown, as of the mid-2020s, is 276. Its sequence has been computed for thousands of steps, reaching numbers with more than two hundred digits. Pushing further requires factoring each new term, which is the bottleneck described in why factoring is hard. Check current project tables for the latest progress.
Parity offers a clue about behavior. The value σ(n) is odd only when n is a square or twice a square. So s(n) usually keeps the parity of n, and sequences tend to stay even or stay odd for long runs. Even sequences with certain factor patterns tend to climb.
Why some steps climb and others crash
The behavior of a sequence is easier to understand if you look at the factors of each term. When a number is even, half of it is a proper divisor, so s(n) is already at least n/2. If it is also divisible by 3, then n/3 and n/6 join in, and the sum of n/2, n/3 and n/6 is n itself, before counting 1, 2 and 3.
So every multiple of 6 larger than 6 is abundant, and its sequence moves upward at the next step. Because many such factor patterns tend to survive from one term to the next, a climb can continue for a long time. Number theorists informally call a persistent pattern of this kind a driver. The perfect numbers supply examples: a term divisible by 4 × 7 = 28 in the right way often passes that factor to its successor.
A crash happens when a term loses the helpful factors or lands on a number with few divisors. A prime sends the sequence straight to 1. An odd square can also change the parity, which breaks whatever pattern had been carrying the climb. This is why two neighboring starting values can have completely different histories.
Looking backward through a sequence
You can also ask which numbers lead to a given value. The value 5 is never produced: no number has proper divisors adding to 5. Numbers that are never a proper divisor sum are called untouchable, and 2 and 5 are the first two. Erdős proved that there are infinitely many of them.
It is conjectured that 5 is the only odd untouchable number. The reason lies in the strong form of the Goldbach conjecture. If an even number can be written as p + q with distinct primes p and q, then s(pq) = 1 + p + q, which produces the odd number one larger than that even number.
Take 13. The even number 12 is 5 + 7, so s(35) = 1 + 5 + 7 = 13. A statement about divisor sums turns out to be tied to one of the most famous open problems about primes, described in the Goldbach conjecture.
What nobody knows about pairs
Very large numbers of amicable pairs are now known, and counts keep rising. Yet several simple questions have no answer.
- Are there infinitely many amicable pairs?
- Is there a pair with one even member and one odd member?
- Is there a pair whose two members share no common factor?
It has been proved, following work by Paul Erdős, that amicable numbers are rare in a precise sense: the proportion of numbers up to N that belong to a pair tends to 0 as N grows. Rarity of this kind is compatible with there being infinitely many.
Why these questions are hard
The divisor sum depends on how a number factors, and factorization behaves unpredictably under addition and subtraction. Knowing the primes in n tells you s(n) exactly, but it tells you very little about the primes in s(n). Each step of a sequence therefore starts almost from scratch.
That also explains why finding pairs is easier than counting them. A clever algebraic form can produce new examples whenever certain expressions happen to be prime. Showing that this happens infinitely often means proving that several expressions are prime at once, which current methods generally cannot do.
Explore it yourself
A short program can hunt for pairs. For each n up to a limit, compute s(n) = m. If m differs from n and s(m) = n, record the pair once, say when n < m.
To compute all the divisor sums efficiently, avoid testing each number separately. Instead, loop over each possible divisor d and add d to every multiple of d larger than d. This sieve idea resembles the sieve of Eratosthenes. Up to 10,000 you should find five pairs: (220, 284), (1184, 1210), (2620, 2924), (5020, 5564) and (6232, 6368).
By hand, try following the aliquot sequence of 30. It runs 30, 42, 54, 66, 78, 90, 144, 259, 45, 33, 15, 9, 4, 3, 1, 0. A climb, a sudden fall and an end, all from one rule.
Common questions
Can a number belong to two different amicable pairs?
No. The partner of n has to be s(n), which is a single value, so each number has at most one partner.
Is every member of a loop abundant?
No. In any loop longer than one, some steps go up and some come down. The larger member of a pair, such as 284, has a proper divisor sum smaller than itself.