Amicable Pairs

March 30, 2025

I have always been fascinated by numbers and their properties and how they are related to one another. During my student life I have spent hundreds of hours reading about different properties of numbers, implementing algorithms to find these numbers for myself and optimizing these algorithms to be faster as I moved to bigger numbers with more digits.

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

Let us give some definitions for better understanding later on:

For any natural number nNn \in \mathbb{N} the sum of divisors σ(n)\sigma(n) is given as

σ(n)=dnd\sigma(n) = \sum_{d | n } d

Here dd is all the numbers that properly divide nn. Let us take an example for n=6n = 6, we have σ(6)=1+2+3+6=12\sigma(6) = 1 + 2 + 3 + 6 = 12.

Sum of proper divisors is given as

s(n)=dnd<nd=σ(n)ns(n) = \sum_{d | n \wedge d < n} d = \sigma(n) - n

Working with the previous example of n=6n=6, we get

s(6)=1+2+3=6=σ(6)6s(6) = 1 + 2 + 3 = 6 = \sigma(6) - 6

One nice thing about prime numbers is that σ(p)=p+1\sigma(p) = p + 1.

Now that we know, how to compute sum of proper divisors, we can define when two numbers are amicable pairs.

Let aNa \in \mathbb{N} and bNb \in \mathbb{N}, then aa and bb are called amicable pairs if and only if, the following is true:

s(a)=b and s(b)=a.s(a) = b \text{ and } s(b) = a.

In other words we can write:

σ(a)=σ(b)=a+b\sigma(a) = \sigma(b) = a + b

The smallest amicable pairs are (220, 284) known to us since 1860. There is a database of known amicable pairs at 2 in Reference.

There are many open questions about amicable pairs:

  • Are there infinitely many amicable pairs?
  • Is there an efficient implementation to identify such numbers?

If you might have not noticed, computation of s(n)s(n) or σ(n)\sigma(n) requires a lot of computation power if we want to find bigger amicable pairs. This is because we would need to identify the prime factorization of the numbers.

Any number aa can be represented as a product of the prime numbers. Let us take another example of n=12n = 12. We can represent this number as n=22×3n = 2^2 \times 3.

In other words let us take all prime numbers in a set PP such that piPp_i \in P, if and only if pinp_i | n and ji=arg maxk(pikn)j_i = \argmax_k \left( p_i ^k | n \right), so jij_i is the maximum power of the prime pip_i that still divides nn without any remainders. Then we can write nn as following:

n=piPpijin = \prod_{p_i \in P} p_i^{j_i}

Then we can write following:

σ(n)=piPpiji+11pi1\sigma(n) = \prod_{p_i \in P} \frac{p_i^{j_i + 1} - 1}{p_i - 1}

Let us have a look at an example:

σ(3×5×7)=1+3+5+7+15+21+35+105=192\sigma(3 \times 5 \times 7) = 1 + 3 + 5 + 7 + 15 + 21 + 35 + 105 = 192

and we see that

σ(3×5×7)=321315215172171=4×6×8=192\sigma(3 \times 5 \times 7) = \frac{3^2 - 1}{3 - 1}\cdot \frac{5^2 - 1}{5 - 1}\cdot \frac{7^2 - 1}{7 - 1} = 4 \times 6 \times 8 = 192

I have a paper, that I should some day finish which gives some properties of amicable numbers not mentioned above which can then be used to find them using methods not being used at the moment. Hopefully soon!

References

  1. Amicable numbers on Wikipedia
  2. Database of Amicable Pairs

Profile picture

Written by Dr. Chhitiz Buchasia a father, wanderer, life long learner, runner and a software engineer. You should follow them on LinkedIn

© 2025, Dr. Chhitiz Buchasia