# Summations extended to the divisors of a natural number and Möbius inversion formula

Prerequirements:

In the previous post we introduced a new kind of summation, the one extended to the divisors of a positive integer number. Summations of this kind are often used in number theory, so it’s worth to analyse them in more details. The most interesting case is the one of double summations extended to divisors: we’ll see that they can be written in simpler ways, especially when the Möbius function comes into play.

## Comparison between “classical” summations and the ones extended to divisors

We know that, when we have to sum up many numbers, the sum can be written concisely by using the summation symbol. For example, the sum of the squares of the integers from 1 to $n$, where $n \geq 1$ is an integer, can be written as follows:

$$\sum_{i = 1}^{n} i^2$$

or, equivalently:

$$\sum_{1 \leq i \leq n} i^2$$

Generally the summation terms, that are the addends of the sum, can be the result of any function $f$ of the variable $i$, which is the index (or variable) of the summation:

$$\sum_{1 \leq i \leq n} f(i) \tag{1}$$

For computing this sum, we have to compute $f(i)$ for all $i = 1, \ldots, n$, and sum up all the values obtained. In fact (1) can be written in full as $f(1) + \ldots + f(n)$. This notation is often useful for understanding what’s going on, but it’s unpractical for making calculations.

In the previous post we saw that, in some summations used in number theory, the summation index does not vary among all the integers between 1 and $n$, but only among the divisors of $n$, and so by convention it’s indicated with the variable $d$:

$$\sum_{d \mid n} f(d) \tag{2}$$

That means computing $f(d)$ only for the positive integers $d$ which divide $n$, and summing up the values obtained, as we saw in Definition N.19.

In order to clarify the difference between summation (1) and summation (2), let’s see an example. For $n = 6$, summation (1) becomes:

$$\sum_{1 \leq i \leq 6} f(i) = f(1) + f(2) + f(3) + f(4) + f(5) + f(6)$$

while summation (2) becomes:

$$\sum_{d \mid 6} f(d) = f(1) + f(2) + f(3) + f(6)$$

The next step is to consider double summations, in which there are two variables, each of which varies within an own set of values. There are several kinds of double summations, but we are most interested in those ones where the variable of the inner summation is limited by the variable of the outer summation, like in the following case:

$$\sum_{1 \leq i \leq n} \sum_{1 \leq j \leq i} f(i, j) \tag{1'}$$

For computing this summation, we have to let $i$ vary between 1 and $n$, for each value of $i$ let $j$ vary between 1 and $i$, compute the value of $f(i, j)$ for each couple $(i, j)$ so obtained, and finally sum up everything.

Considering only the divisors of $n$, we’ll obtain the following summation, analogous to (1′):

$$\sum_{d \mid n} \sum_{d^{\prime} \mid d} f(d, d^{\prime}) \tag{2'}$$

For computing this summation, we have to let $d$ vary within the set of divisors of $n$, for each value of $d$ let $d^{\prime}$ vary within the set of divisors of $d$, compute for each couple $(d, d^{\prime})$ the value of $f(d, d^{\prime})$, and finally sum up everything.

For $n = 6$, summation (1′) becomes:

\begin{aligned} \sum_{1 \leq i \leq n} \sum_{1 \leq j \leq i} f(i, j) & = \\ \\ \sum_{1 \leq j \leq 1} f(1, j) + \sum_{1 \leq j \leq 2} f(2, j) + \sum_{1 \leq j \leq 3} f(3, j) & + \\ \sum_{1 \leq j \leq 4} f(4, j) + \sum_{1 \leq j \leq 5} f(5, j) + \sum_{1 \leq j \leq 6} f(6, j) & = \\ \\ f(1, 1) & + \\ f(2, 1) + f(2, 2) & + \\ f(3, 1) + f(3, 2) + f(3, 3) & + \\ f(4, 1) + f(4, 2) + f(4, 3) + f(4, 4) & + \\ f(5, 1) + f(5, 2) + f(5, 3) + f(5, 4) + f(5, 5) & + \\ f(6, 1) + f(6, 2) + f(6, 3) + f(6, 4) + f(6, 5) + f(6, 6) & \end{aligned}

while summation (2′) becomes:

\begin{aligned} \sum_{d \mid n} \sum_{d^{\prime} \mid d} f(d, d^{\prime}) & = \\ \\ \sum_{d^{\prime} \mid 1} f(1, d^{\prime}) + \sum_{d^{\prime} \mid 2} f(2, d^{\prime}) + \sum_{d^{\prime} \mid 3} f(3, d^{\prime}) + \sum_{d^{\prime} \mid 6} f(6, d^{\prime}) & = \\ \\ f(1, 1) & + \\ f(2, 1) + f(2, 2) & + \\ f(3, 1) + f(3, 3) & + \\ f(6, 1) + f(6, 2) + f(6, 3) + f(6, 6) & \end{aligned}

## Alternative forms for summations extended to divisors

Now let’s leave the comparison with “classical” summations, like (2), and let’s focus on summations extended to divisors, like (1′) and (2′). In fact, the summations of this kind can be written in several ways, which are worth to point out because they will be used often in the next posts.

Let’s start from single summations. In number theory there is often a version of summation (1′) where in the summation term, along with the divisor $d$, there is also its “complementary” with respect to $n$, that is the ratio $\frac{n}{d}$:

$$\sum_{d \mid n} f\left(d, \frac{n}{d}\right) \tag{3}$$

It’s important to know that, in this kind of summations, and also for the corresponding productions, the roles of $d$ and $\frac{n}{d}$ can be exchanged:

$$\sum_{d \mid n} f\left(d, \frac{n}{d}\right) = \sum_{d \mid n} f\left(\frac{n}{d}, d\right)$$

In fact, making the calculations, you can see that the final sum is the same, up to the order of the addends.

For $n = 6$ we’ll have:

\begin{aligned} \sum_{d \mid 6} f\left(d, \frac{6}{d}\right) & = \\ f\left(1, \frac{6}{1}\right) + f\left(2, \frac{6}{2}\right) + f\left(3, \frac{6}{3}\right) + f\left(6, \frac{6}{6}\right) & = \\ f(1, 6) + f(2, 3) + f(3, 2) + f(6, 1) \end{aligned}

while

\begin{aligned} \sum_{d \mid 6} f\left(\frac{6}{d}, d\right) & = \\ f\left(\frac{6}{1}, 1\right) + f\left(\frac{6}{2}, 2\right) + f\left(\frac{6}{3}, 3\right) + f\left(\frac{6}{6}, 6\right) & = \\ f(6, 1) + f(3, 2) + f(2, 3) + f(1, 6) \end{aligned}

Indeed, we’ve obtained the same product as before, but in reverse order.

Generally we can state the following property, which considers also the case of productions:

Exchange between $d$ and $\frac{n}{d}$ in summations extended to the divisors of a positive integer

Let $n$ be a positive integer. Let $f$ any function defined on $\mathbb{N}^{\star} \times \mathbb{N}^{\star}$ (the codomain does not matter(*)). Then:

$$\sum_{d \mid n} f\left(d, \frac{n}{d}\right) = \sum_{d \mid n} f\left(\frac{n}{d}, d\right)$$
$$\prod_{d \mid n} f\left(d, \frac{n}{d}\right) = \prod_{d \mid n} f\left(\frac{n}{d}, d\right)$$

(*) To be precise, it’s necessary that the operations of sum and product are defined on the codomain, and they must be commutative. However in this context there is no problem at all, because this is true for the numerical sets we are interested in ($\mathbb{N}$, $\mathbb{Z}$ and $\mathbb{R}$).

Let’s prove the first equation:

$$\sum_{d \mid n} f\left(d, \frac{n}{d}\right) = \sum_{d \mid n} f\left(\frac{n}{d}, d\right) \tag{a}$$

For proving (a), since sum is commutative, it’s sufficient to prove that every term on the right appears also on the left, and vice versa.
Let’s consider a divisor $a$ of $n$ (we may call it $d$, but for clarity we avoid using the same symbol of the variable of the two summations). It’s clear that on the left there is the term $f\left(a, \frac{n}{a}\right)$, because it’s enough to set $d := a$. Let’s see if this term appears also on the right. We can note that, if $a$ is a divisor of $n$, also $\frac{n}{a}$ is a divisor of $n$ (by Definition N.2 (Divisibility), this comes from the equality $a \cdot \frac{n}{a} = n$). Then $\frac{n}{a}$ is one of the values of $d$ in the right summation. So one of the terms of the right summation can be obtained by putting $\frac{n}{a}$ in place of $d$ within the generic term $f\left(\frac{n}{d}, d\right)$, obtaining $f\left(\frac{n}{\frac{n}{a}}, \frac{n}{a}\right) = f\left(a, \frac{n}{a}\right)$, which is the same term we located on the left. Repeating this argument as $a$ varies within the divisors of $n$, we’ll have that all the terms on the right appear also on the left.
Now we should repeat the same argument in the opposite direction, in order to prove that each term on the right appears also on the left. But we can avoid to do that, by noting that the number of terms of the two summations is the same, and it’s equal to the number of divisors of $n$. We have seen that all the terms on the left appear also on the right, but the right summation cannot contain additional terms which don’t appear on the left, just because the total number of terms is the same. This completes the proof.

The proof of the second equality is analogous to the first: the only difference is that instead of the sum there is the product.

By applying Property N.13, starting from Property N.12 (logarithmic form) we can obtain immediately that $\sum_{d \mid n} \mu\left(\frac{n}{d}\right) \log d = \Lambda(n)$.

In the previous example we can note that, after all, summation (3) is reduced to compute the function $f$ for all the ordered couples of positive integers the product of which is $n$. In fact, if $n = 6$ these couples are $(1, 6)$, $(2, 3)$, $(3, 2)$ and $(6, 1)$, which are exactly the couples of values for which the function $f$ was computed in the example. In order to highlight that, we can write summation (3) in the following form:

$$\sum_{ab = n} f(a, b) \tag{3'}$$

where the symbol $\sum_{ab = n}$ is defined as follows:

Summations and productions extended to couples of variables with constant product

Let $n$ be a positive integer. We define the following symbols:

$$\sum_{ab = n} := \sum_{(a,b) \in \{ (a,b) \in \mathbb{N}^{\star} \times \mathbb{N}^{\star} \mid ab = n\}}$$
$$\prod_{ab = n} := \prod_{(a,b) \in \{ (a,b) \in \mathbb{N}^{\star} \times \mathbb{N}^{\star} \mid ab = n\} }$$

So we can state the following Property:

Equivalent form for summations with $d$ and $\frac{n}{d}$

Let $n$ be a positive integer. Let $f$ be any function defined on $\mathbb{N}^{\star} \times \mathbb{N}^{\star}$ (the codomain does not matter(*)). Then:

$$\sum_{d \mid n} f\left(d, \frac{n}{d}\right) = \sum_{ab = n} f(a,b)$$
$$\prod_{d \mid n} f\left(d, \frac{n}{d}\right) = \prod_{ab = n} f(a,b)$$

(*) The same observations made about Property N.13 are also valid now

Let’s prove the first equality, the one with summation, because the other one can be proved in the same manner.
Like we did for Property N.13, the proof consists in showing that all the terms in the summation on the left appear also in the summation on the right, and vice versa.
Let’s consider a term of the left summation, i.e. $f\left(d, \frac{n}{d}\right)$, for some fixed $d$, divisor of $n$. Setting $a := d$ and $b := \frac{n}{d}$, we’ll have that $a$ and $b$ are two positive integers such that $ab = n$, so the right summation will contain the term $f(a,b)$. But $f(a, b) = f\left(d, \frac{n}{d}\right)$, i.e. $f(a,b)$ is just the term he had chosen on the left. Since this argument can be repeated for every value of the variable $d$ of the left summation, we’ll have that all the terms of the left summation appear also in the right one.
Now let’s consider a term of the right summation, i.e. $f(a, b)$, where $a$ and $b$ are two positive integers such that $ab = n$. We can note that, by the latter equality, $a$ is a divisor of $n$ and $b = \frac{n}{a}$. Then, by setting $d := a$, we’ll have that $f(a, b) = f\left(a, \frac{n}{a}\right) = f\left(d, \frac{n}{d}\right)$, so the term $f(a, b)$ we had chisen in the right summation appears also in the left one. Since this argument can be repeated for each term of the right summation, we’ll have that all the terms of the right summation appear also in the left one. This completes the proof.

If in summation (3′) we replace the equality sign by the divisibility symbol, we’ll obtain another kind of summation rather common in number theory:

$$\sum_{ab \mid n} f(a, b) \tag{4}$$

As you may expect, this kind of summation is defined by putting $\mid$ in place of $=$ in Definition N.20:

Summations and productions extended to couples of variables the product of which divides a constant

Let $n$ be a positive integer. We define the following symbols:

$$\sum_{ab \mid n} := \sum_{(a,b) \in \{(a,b) \in \mathbb{N}^{\star} \times \mathbb{N}^{\star} \ \mid\ ab \mid n\} }$$
$$\prod_{ab \mid n} := \prod_{((a,b) \in \{(a,b) \in \mathbb{N}^{\star} \times \mathbb{N}^{\star} \ \mid\ ab \mid n\} }$$

As interesting aspect is that there is a double summation which appears complicated at first sight, but can be reduced to form (4):

$$\sum_{d \mid n} \sum_{d^{\prime} \mid d} g(d^{\prime}) h\left(\frac{d}{d^{\prime}}\right) \tag{5}$$

Let’s see an example with $n = 12$:

\begin{aligned} \sum_{d \mid 12} \sum_{d^{\prime} \mid d} g(d^{\prime}) h\left(\frac{d}{d^{\prime}}\right) & = \\ \\ \sum_{d^{\prime} \mid 1} g(d^{\prime}) h\left(\frac{1}{d^{\prime}}\right) + \sum_{d^{\prime} \mid 2} g(d^{\prime}) h\left(\frac{2}{d^{\prime}}\right) + \sum_{d^{\prime} \mid 3} g(d^{\prime}) h\left(\frac{3}{d^{\prime}}\right) & + \\ \sum_{d^{\prime} \mid 4} g(d^{\prime}) h\left(\frac{4}{d^{\prime}}\right) + \sum_{d^{\prime} \mid 6} g(d^{\prime}) h\left(\frac{6}{d^{\prime}}\right) + \sum_{d^{\prime} \mid 12} g(d^{\prime}) h\left(\frac{12}{d^{\prime}}\right) & = \\ \\ g(1) h\left(\frac{1}{1}\right) & + \\ g(1) h\left(\frac{2}{1}\right) + g(2) h\left(\frac{2}{2}\right) & + \\ g(1) h\left(\frac{3}{1}\right) + g(3) h\left(\frac{3}{3}\right) & + \\ g(1) h\left(\frac{4}{1}\right) + g(2) h\left(\frac{4}{2}\right) + g(4) h\left(\frac{4}{4}\right) & + \\ g(1) h\left(\frac{6}{1}\right) + g(2) h\left(\frac{6}{2}\right) + g(3) h\left(\frac{6}{3}\right) + g(6) h\left(\frac{6}{6}\right) & + \\ g(1) h\left(\frac{12}{1}\right) + g(2) h\left(\frac{12}{2}\right) + g(3) h\left(\frac{12}{3}\right) + g(4) h\left(\frac{12}{4}\right) + g(6) h\left(\frac{12}{6}\right) + g(12) h\left(\frac{12}{12}\right) & = \\ \\ g(1) h(1) & + \\ g(1) h(2) + g(2) h(1) & + \\ g(1) h(3) + g(3) h(1) & + \\ g(1) h(4) + g(2) h(2) + g(4) h(1) & + \\ g(1) h(6) + g(2) h(3) + g(3) h(2) + g(6) h(1) & + \\ g(1) h(12) + g(2) h(6) + g(3) h(4) + g(4) h(3) + g(6) h(2) + g(12) h(1) \end{aligned}

Finally we have obtained the sum of all the possible terms of the kind $g(a) h(b)$, where $ab$ is a divisor of $n$, so the initial summation is reduced to

$$\sum_{ab \mid 12} g(a) h(b)$$

If we put $f(a, b) := g(a) h(b)$, this summation will be just in the form (4).

Generally, the following Property is true:

Equivalent form for double summations with $d$ and $\frac{n}{d}$

Let $n$ be a positive integer. Let $g$ and $h$ any two functions defined on $\mathbb{N}^{\star} \times \mathbb{N}^{\star}$ (the codomain does not matter(*)). Then:

$$\sum_{d \mid n} \sum_{d^{\prime} \mid d} g(d^{\prime}) h\left(\frac{d}{d^{\prime}}\right) = \sum_{ab \mid n} g(a) h(b)$$
$$\prod_{d \mid n} \prod_{d^{\prime} \mid d} g(d^{\prime}) h\left(\frac{d}{d^{\prime}}\right) = \prod_{ab \mid n} g(a) h(b)$$

(*) The same observations made about Property N.13 are also valid now

We’ll follow the same principle of the previous proofs: in order to prove that the two summations are equal, we have to show that each term which appears on the right also appears on the left, and vice versa.

Let’s consider a term of the right summation. It’s given by $g(a) h(b)$, where $a$ and $b$ are two positive integers such that $ab \mid n$. Let’s see if this term appears also in the left summation. If so, there should exist two positive integers $d$ and $d^{\prime}$ such that:

• $d \mid n$
• $d^{\prime} \mid d$
• $d^{\prime} = a$
• $\frac{d}{d^{\prime}} = b$

But these integers exist, because, as you can obtain from the last two equations, it’s sufficient to set:

$$(d, d^{\prime}) := (ab, a) \tag{b}$$

In fact, these values of $d$ and $d^{\prime}$ satisfy the first two equations, since by hypothesis $ab \mid n$, and of course they satisfy also the other two ones from which they have been obtained. So the mapping (b) lets associate every possible couple of values of the variables $(a, b)$ of the right summation, to a couple of values for the variables $(d, d^{\prime})$ which generate the same term in the left summation.

So we proved that all the terms of the right summation appear in the left one; now we have to prove the converse. So let’s consider a term of the left summation. It will be of the kind $g(d^{\prime}) f\left(\frac{d}{d^{\prime}}\right)$, where $d$ is a divisor of $n$ and $d^{\prime}$ is a divisor of $d$. Will we find this term also in the right summation? If so, there should exist two positive integers $a$ and $b$ such that:

• $ab \mid n$
• $a = d^{\prime}$
• $b = \frac{d}{d^{\prime}}$

The values of $a$ and $b$ are given by the last two equations:

$$(a, b) := (d^{\prime}, \frac{d}{d^{\prime}}) \tag{c}$$

These values, in addition, satisfy also the first equation, since $ab = d^{\prime} \frac{d}{d^{\prime}} = d \mid n$.

So, the mapping (c) lets associate every possible couple of values of the variables $(d, d^{\prime})$ of the left summation, to a couple of values for the variables $(a, b)$ which generate the same term in the right summation. This guarantees that all the terms of the left summation appear in the right one, and it completes the proof.

A useful exercise would be resuming the comparison, which we suspended, between “classical” summations and the ones extended to divisors. In fact, the equivalent “classical” counterparts of the Properties N.13, N.14 and N.15 can be found, by making the following replacements:

Summations extended to divisors “Classical” summations
Positive divisors Positive integers
$\mid$ symbol $\leq$ symbol
Product between summation variables Sum between summation variables
Ratio between $n$ and one summation variable Difference between $n$ and one summation variable

But why should we complicate our life with summation (5), if (4) is simpler, but equivalent by Property N.15?
The reason is that, in (5), the inner summation may be something already known. Let’s take as an example Property N.12 (logarithmic form):

$$\Lambda(n) = \sum_{d \mid n} \mu(d) \log \frac{n}{d} \tag{6}$$

If now we want to compute the summation:

$$\sum_{d \mid n} \Lambda(d) \tag{7}$$

we have to apply (6) by putting $d$ in place of $n$, consequently choosing another name for the variable $d$, for example $d^{\prime}$:

$$\Lambda(d) = \sum_{d^{\prime} \mid d} \mu(d^{\prime}) \log \frac{d}{d^{\prime}} \tag{6'}$$

Substituting into (7), we’ll have:

$$\sum_{d \mid n} \Lambda(d) = \sum_{d \mid n} \sum_{d^{\prime} \mid d} \mu(d^{\prime}) \log \frac{d}{d^{\prime}}$$

We have reduced to form (5), with $g := \mu$ and $f := \log$. So we can apply Property N.15, obtaining:

$$\sum_{d \mid n} \Lambda(d) = \sum_{d \mid n} \sum_{d^{\prime} \mid d} \mu(d^{\prime}) \log \frac{d}{d^{\prime}} = \sum_{ab \mid n} \mu(a) \log(b) \tag{8}$$

So, roughly speaking, Property N.15 lets simplify summations when double ones are created as an effect of substitutions.

But that’s not all. The summation we have obtained, in fact, can be simplified further. More generally, all summations like this can be simplified:

$$\sum_{ab \mid n} \mu(a) f(b) \tag{9}$$

In fact, by gathering the terms with the same argument of the function $f$, and by using Property N.11, the following property can be proved:

Simplification, by means of the Möbius function, of a double summation extended to the divisors of a positive integer, and to the divisors of the divisors

Let $n$ be a positive integer. Let $f$ be any function defined on $\mathbb{N}^{\star}$ (the codomain does not matter(*)). Then:

$$\sum_{ab \mid n} \mu(a) f(b) = f(n) \tag{10}$$

(*) The same observations made about Property N.13 are also valid now

An example of this Property, for $n = 12$, is illustrated in Figure 1, where, for each value of $d$, the summation $\mu(d^{\prime}) f\left(\frac{d}{d^{\prime}}\right)$ is shown by arranging the values of $f$ according to the Hasse diagram of $d$ (recall that the Hasse diagram has been used in the previous post).

For $n = 12$, summation (9) becomes:

\begin{aligned} \sum_{ab \mid 12} \mu(a) f(b) & = \\ \\ \mu(1) f(1) & + \\ \mu(1) f(2) + \mu(2) f(1) & + \\ \mu(1) \boldsymbol{f(3)} + \mu(3) f(1) & + \\ \mu(1) f(4) + \mu(2) f(2) + \mu(4) f(1) & + \\ \mu(1) f(6) + \mu(2) \boldsymbol{f(3)} + \mu(3) f(2) + \mu(6) f(1) & + \\ \mu(1) f(12) + \mu(2) f(6) + \mu(3) f(4) + \mu(4) \boldsymbol{f(3)} + \mu(6) f(2) + \mu(12) f(1) \tag{d} \end{aligned}

We can note that the same values of the function $f$ are repeated many times, multiplicated by different values of $\mu$, so we can gather them. Doing so, each of them will be multiplied by a summation of values of $\mu$. For example, the value $\boldsymbol{f(3)}$, highlighted in bold, appears in three terms in which it’s multiplied respectively by $\mu(4)$, $\mu(2)$ and $\mu(1)$, hence gathering these terms we’ll obtain $\boldsymbol{f(3)}(\mu(1) + \mu(2) + \mu(4))$.
Before proceeding with the simplification of (d), it’s useful to align the terms of different rows which have the same argument of the function $f$:

\begin{aligned} & & & & & \mu(1) f(1) & + \\ & & & & \mu(1) f(2) + & \mu(2) f(1) & + \\ & & & \mu(1) f(3) & + & \mu(3) f(1) & + \\ & & \mu(1) f(4) + & & \mu(2) f(2) + & \mu(4) f(1) & + \\ & \mu(1) f(6) + & & \mu(2) f(3) + & \mu(3) f(2) + & \mu(6) f(1) & + \\ \mu(1) f(12) + & \mu(2) f(6) + & \mu(3) f(4) + & \mu(4) f(3) + & \mu(6) f(2) + & \mu(12) f(1) & \end{aligned}

Now, in order to gather the repeated terms $f(\cdot)$ we simply have to read this expression by columns instead of by rows. Doing so, we’ll obtain:

\begin{aligned} f(1)\left( \mu(1) + \mu(2) + \mu(3) + \mu(4) + \mu(6) + \mu(12) \right) & + \\ f(2) \left( \mu(1) + \mu(2) + \mu(3) + \mu(6) \right) & + \\ f(3) \left( \mu(1) + \mu(2) + \mu(4) \right) & + \\ f(4) \left( \mu(1) + \mu(3) \right) & + \\ f(6) \left( \mu(1) + \mu(2) \right) & + \\ f(12) \mu(1) & = \\ \\ f(1) \sum_{d \mid 12} \mu(d) + f(2) \sum_{d \mid 6} \mu(d) + f(3) \sum_{d \mid 4} \mu(d) & + \\ f(4) \sum_{d \mid 3} \mu(d) + f(6) \sum_{d \mid 2} \mu(d) + f(12) \sum_{d \mid 1} \mu(d) & \end{aligned}

But, by Property N.11, all the summations of $\mu(d)$ which we have obtained are zero, except for the last one which is 1, so the previous expression is reduced simply to $f(12)$.

Like we did in the previous example, let’s gather in (10) all the terms of the kind $f(b)$. First of all, the possible values of $b$ are the divisors of $n$, by the relationship $ab \mid n$. In fact, from $b \mid ab$ and $ab \mid n$ it follows that $b \mid n$; moreover, if $d$ is a divisor or $n$, we can set $b := d$ and $a := \frac{n}{d}$, obtaining a couple of allowed values for the summation variables, because $ab = \frac{n}{d} d = n$, so $ab \mid n$).
So let’s fix a divisor $d$ of $n$. Having established that $d$ is one of the possible values of $b$, let’s ask ourselves now which are the summation terms with $d$ as the value of the variable $b$. If the generic term of the summation is $\mu(a) f(b)$, with $ab \mid n$, we have to look for all the values of $a$ which generate terms of the kind $\mu(a) f(d)$. Such a term appears in the summation if and only if $ad \mid n$, hence $a \mid \frac{n}{d}$. So, setting $b := d$, all the possible values of $a$ are the divisors of $\frac{n}{d}$. Doing so, as $d$ varies, we’ll exhaust all the summation terms, hence:

$$\sum_{ab \mid n} \mu(a) f(b) = \sum_{d \mid n} \sum_{a \mid \frac{n}{d}} \mu(a) f(d)$$

In the inner summation, we have gathered all the terms with $f(d)$. The next step is to apply the distributive property:

$$\sum_{d \mid n} \sum_{a \mid \frac{n}{d}} \mu(a) f(d) = \sum_{d \mid n} f(d) \left( \sum_{a \mid \frac{n}{d}} \mu(a) \right)$$

By Property N.11, the inner summation is always zero, except when $\frac{n}{d} = 1$, that is when $d = n$. So:

$$\sum_{d \mid n} f(d) \left( \sum_{a \mid \frac{n}{d}} \mu(a) \right) = f(n) \cdot 1 = f(n)$$

By joining all the previous equalities, we’ll obtain (10).

Property N.16 is one of the reasons for which sums in number theory are more used than products: in fact, differently from Properties N.10 and N.12, there isn’t a product version of this Property (the reason is that the proof is based on Property N.11, which in turn exists only with sum).

For better clarity, we now summarise into a table the properties of summations that we have seen till now:

Summation Equivalent form Reference
$$\sum_{d \mid n} f\left(d, \frac{n}{d}\right)$$ $$\sum_{d \mid n} f\left(\frac{n}{d}, d\right)$$ Property N.13
$$\sum_{d \mid n} f\left(d, \frac{n}{d}\right)$$ $$\sum_{ab = n} f(a,b)$$ Property N.14
$$\sum_{d \mid n} \sum_{d^{\prime} \mid d} g(d^{\prime}) h\left(\frac{d}{d^{\prime}}\right)$$ $$\sum_{ab \mid n} g(a) h(b)$$ Property N.15
$$\sum_{ab \mid n} \mu(a) f(b)$$ $$f(n)$$ Property N.16

From formula (8), by applying Property N.16 with $f := \log$, we can obtain immediately a new property of the function $\Lambda$:

Expression of logarithm as a summation of $\Lambda$

Let $n$ be a positive integer. Then:

$$\sum_{d \mid n} \Lambda(d) = \log n \tag{11}$$

This Property is a sample application of the Möbius function: the knowledge of this function and its properties allowed us to obtain it immediately, otherwise we should have proved it separately.

## The Möbius inversion formula

Comparing formulas (6) and (11), we can note that they are one the inverse of the other, meaning that:

• in the first formula, the function $\Lambda$ is expressed as a summation of logarithms (with appropriate coefficients given by the Möbius function);
• in the second formula, the logarithm is expressed as a summation of the function $\Lambda$.

Since the passage from one formula to the other one is based on the properties of $\mu$, not of $\Lambda$, the same thing can be true for any function. Indeed, Properties N.15 and N.16 can be joined into a single one, called Möbius inversion formula (even if, rather than a formula, it’s a way for obtaining one formula from another):

Möbius inversion formula

Let $n$ be a positive integer. Let $f$ be any function defined on $\mathbb{N}^{\star}$ (the codomain does not matter(*)), and let $g$ be the function defined for all $n \in \mathbb{N}^{\star}$ as follows:

$$g(n) := \sum_{d \mid n} \mu(d) f\left(\frac{n}{d}\right)$$

Then

$$\sum_{d \mid n} g(d) = f(n)$$

for all $n \in \mathbb{N}^{\star}$.

(*) The same observations made about Property N.13 are also valid now

In order to prove that

$$\sum_{d \mid n} g(d) = f(n) \tag{e}$$

we have to substitute into this equality the definition of $g$:

$$g(n) := \sum_{d \mid n} \mu(d) f\left(\frac{n}{d}\right) \tag{f}$$

Though, before substituting, it’s convenient to rename the variable $n$ within (f) into $d$, consequently using another name for the variable $d$ within the same formula, renaming it into $d^{\prime}$:

$$g(d) := \sum_{d^{\prime} \mid d} \mu(d) f\left(\frac{d}{d^{\prime}}\right) \tag{f'}$$

This formula is perfectly equivalent to (f), but, differently from the latter, it can be put into (e) directly, obtaining:

$$\sum_{d \mid n} g(d) = \sum_{d \mid n} \sum_{d^{\prime} \mid d} \mu(d) f\left(\frac{d}{d^{\prime}}\right)$$

The thesis follows by applying the Properties N.15 and N.16:

\begin{aligned} \sum_{d \mid n} \sum_{d^{\prime} \mid d} \mu(d) f\left(\frac{d}{d^{\prime}}\right) & = \text{[by Property N.15]} \\ \sum_{ab \mid n} \mu(a) f(b) & = \text{[by Property N.16]}\\ f(n)\end{aligned}