Analytic Number Theory/Formulas for number-theoretic functions

Formulas for the Möbius μ function
Lemma 2.9:


 * $$\sum_{d|n} \mu(d) \frac{n}{d} = \prod_{j=1}^r \left( p_j^{k_j} - p_j^{k_j - 1} \right)$$.

Proof:

For $$\kappa \in \mathbb Z^r$$ a multiindex, $$\alpha \in \{0,1\}^r$$ and $$Q \in \mathbb C^r$$ a vector define
 * $$Q^\alpha := \prod_{j = 1}^r q_j^{\alpha_j}$$,
 * $$Q^\kappa := (q_1^{k_1}, \ldots, q_r^{k_r})$$.

Let $$n = (P^\kappa)^1 = p_1^{k_1} \cdots p_r^{k_r}$$. Then
 * $$\begin{align}

\prod_{j=1}^r \left( p_j^{k_j} - p_j^{k_j - 1} \right) & = \sum_{\alpha \in \{0, 1\}^r} (P^\kappa)^\alpha (P^{\kappa - 1})^{1 - \alpha} (-1)^|{1 - \alpha|} \\ & = \sum_{d|n} \mu(d) \frac{n}{d} \end{align}$$.

Lemma 2.10:


 * $$\varphi = \mu * I_1$$.

Proof 1:

We prove the lemma from lemma 2.14.

We have by lemma 2.14
 * $$\begin{align}

\varphi(n) & = \sum_{k=1}^n \delta(\gcd(k,n)) \\ & = \sum_{k=1}^n \sum_{d|\gcd(k,n)} \mu(d) \\ & = \sum_{d|n} \sum_{k=1}^n [d|k] \mu(d) \\ & = \sum_{d|n} \sum_{j=1}^{n/d} \mu(d) \end{align}$$

Proof 2:

We prove the lemma from the product formula for Euler's totient function and lemma 2.9. Indeed, for $$n = p_1^{k_1} \cdots p_r^{k_r}$$
 * $$\varphi(n) = \prod_{j=1}^r (p_j^{k_j} - p_j^{k_j - 1}) = \mu * I_1$$.

Lemma 2.14:


 * $$E * \mu = \delta$$.

Proof 1:

We use the Möbius inversion formula.

Indeed, $$E(n) = \sum_{d|n} \delta(d) = 1$$, and hence $$\delta = \mu * E$$.

Proof 2:

We use multiplicativity.

Indeed, for a prime $$p$$, $$k \in \mathbb N$$ we have
 * $$E * \mu (p^k) = \sum_{j=0}^k \mu(p^j) = \mu(1) + \mu(p) = 0$$,

and thus due to the multiplicativity of $$\mu$$ and $$E$$ $$E * \mu(n) = 0$$ if $$n$$ contains at least one prime factor. Since further $$E * \mu(1) = 1$$ the claim follows.

Proof 3:

We prove the lemma by direct computation. Indeed, if $$1 \neq n = P^\kappa$$, then
 * $$\begin{align}

E * \mu(n) &= \sum_{d|n} \mu(d) \\ & = \sum_{\alpha \in \{0,1\}^r} \mu(P^\alpha) \\ & = \sum_{\beta \in \{0,1\}^{r-1}} \left( \mu(P^{(0, \beta)}) + \mu(P^{(1, \beta)}) \right) = 0 \end{align}$$.

Proof 4:

We prove the lemma from the Binomial theorem and combinatorics.

Let $$n = p_1^{k_1} \cdots p_r^{k_r}$$. From combinatorics we note that for $$m \le r$$, there exist $$\binom{m}{r}$$ distinct ways to pick a subset $$I \subseteq \{1, \ldots, r\}$$ such that $$|I| = m$$. Define $$\alpha_I = (\alpha_1, \ldots, \alpha_r) \in \{0,1\}^r$$ where $$\alpha_j = 1 \Leftrightarrow j \in I$$. Then, by the Binomial theorem
 * $$\begin{align}

E * \mu(n) &= \sum_{d|n} \mu(d) \\ & = \sum_{I \subseteq \{1, \ldots, r\}} \mu(P^{\alpha_I}) \\ & = \sum_{I \subseteq \{1, \ldots, r\}} (-1)^{|I|} \\ & = \sum_{j=0}^r \binom{j}{r} (-1)^j 1^j = (1 - 1)^r = 0 \end{align}$$.

Formulas for Euler's totient function
Lemma 2.11 (Gauß 1801):


 * $$\forall n \in \mathbb N: n = \sum_{d|n} \varphi(d)$$.

Proof 1:

We use the Möbius inversion formula, proven below without using this lemma, and lemma 2.10.

We have $$\sum_{d|n} \varphi(d) = S_\varphi(n)$$ and hence $$\varphi = \mu * S_\varphi$$ by the Möbius inversion formula. On the other hand,
 * $$\varphi(n) = \mu * I_1(n)$$

by lemma 2.10.

Hence, we obtain $$\mu * S_\varphi = \mu * I_1$$, and by cancellation of $$\mu$$ (the arithmetic functions form an integral domain) we get the lemma.

Proof 2:

We use the converse of the Möbius inversion formula, proven below without using this lemma, and lemma 2.10.

Since $$\varphi(n) = \mu * I_1(n)$$ by lemma 2.10, we obtain from the converse of the Möbius inversion formula that $$I_1(n) = S_\varphi(n)$$.

Proof 3:

We prove the lemma by double counting.

We first note that there are $$n$$ many fractions of the form $$\frac{m}{n}$$, $$1 \le m \le n$$.

We now prove that there are also $$\sum_{d|n} \varphi(d)$$ many fractions of this form. Indeed, each fraction $$\frac{m}{n}$$, $$1 \le m \le n$$ can be reduced to $$\frac{b}{d}$$, where $$\gcd(b,d) = 1$$. $$d$$ is a divisor of $$n$$, since it is obtained by dividing $$n$$. Furthermore, for each divisor $$d$$ of $$n$$ there exist precisely $$\varphi(d)$$ many such fractions by definition of $$\varphi$$.

Proof 4:

We prove the lemma by the means of set theory.

Define $$S_{n, d} := \{1 \le l \le n | \gcd(d,l) = 1\}$$. Then $$S_{n, d} = \{d k | 1 \le k \le n/d, \gcd(k, n) = 1\} = d S_{n/d, 1}$$. Since $$|S_{n/d, 1}| = \varphi(n/d)$$ and $$\{1, \ldots, n\}$$ is the disjoint union of the sets $$S_{n, d}, d|n$$, we thus have
 * $$n = \sum_{d|n} |S_{n, d}| = \sum_{d|n} d \varphi\left( \frac{n}{d} \right)$$.

The next theorem comprises one of the most important examples for a multiplicative function.

Proof 1:

We prove the theorem using double counting (due to Kronecker).

By definition of $$\varphi$$, there are $$\varphi(m)\varphi(n)$$ sums of the form
 * $$\frac{k}{m} + \frac{l}{n}, 1 \le k \le m, 1 \le l \le n$$,

where both summands are reduced. We claim that there is a bijection
 * $$\left\{ \frac{k}{m} + \frac{l}{n} \big| 1 \le k \le m, 1 \le l \le n, \frac{k}{m}, \frac{l}{n} \text{ reduced} \right\} \to \left\{ \frac{r}{mn} \big| 1 \le r \le \frac{r}{mn} \text{ reduced} \right\}$$.

From this would follow $$\varphi(m)\varphi(n) = \varphi(mn)$$.

We claim that such a bijection is given by $$\frac{k}{m} + \frac{l}{n} \mapsto \frac{nk + ml \mod mn}{nm}$$.

Well-definedness: Let $$\frac{k}{m}$$, $$\frac{l}{n}$$ be reduced. Then
 * $$\frac{k}{m} + \frac{l}{n} = \frac{kn +lm \mod mn}{nm}$$

is also reduced, for if $$p|(nm)$$, then without loss of generality $$p|n$$, and from $$p|(kn + lm -cnm)$$ follows $$p|l$$ or $$p|m$$. In both cases we obtain a contradiction, either to $$\gcd(m,n) = 1$$ or to $$\frac{l}{n}$$ is reduced.

Surjectivity: Let $$\frac{r}{mn}$$ be reduced. Using the Euclidean algorithm, we find $$a, b \in \mathbb N$$ such that $$an + bm = 1$$. Then $$ran + rbm = r$$. Define $$k = ra \mod m$$, $$l = rb \mod n$$. Then
 * $$kn + lm = (ra + tm)n + (rb + sn)m \equiv r \mod mn$$.

Injectivity: Let $$kn + lm \equiv k'n + l'm \mod mn$$. We show $$k = k'$$; the proof for $$l = l'$$ is the same.

Indeed, from $$kn + lm \equiv k'n + l'm \mod mn$$ follows $$kn \equiv k'n \mod m$$, and since $$\gcd(m,n) = 1$$, $$n$$ is invertible modulo $$m$$, which is why we may multiply this inverse on the right to obtain $$k \equiv k' \mod m$$. Since $$1 \le k, k' \le m$$, the claim follows.

Proof 2:

We prove the theorem from the Chinese remainder theorem.

Let $$n = p_1^{k_1} \cdots p_r^{k_r}$$. From the Chinese remainder theorem, we obtain a ring isomorphism
 * $$\mathbb Z/n \to \mathbb Z/p_1^{k_1} \times \cdots \times \mathbb Z/p_r^{k_r}$$,

which induces a group isomorphism
 * $$(\mathbb Z/n)^\times \to \left(\mathbb Z/p_1^{k_1}\right)^\times \times \cdots \times \left(\mathbb Z/p_r^{k_r}\right)^\times$$.

Hence, $$\left| (\mathbb Z/n)^* \right| = \prod_{j=1}^r \left| \left(\mathbb Z/p_j^{k_j}\right)^* \right|$$, and from $$\forall m \in \mathbb N : \varphi(m) = \left| (\mathbb Z/m)^* \right|$$ follows the claim.

Proof 3: We prove the theorem from lemma 2.11 and induction (due to Hensel).

Let $$m, n \in \mathbb N$$ such that $$\gcd(m,n) = 1$$. By lemma 2.11, we have $$m = \sum_{e|m} \varphi(e)$$ and $$n = \sum_{d|m} \varphi(d)$$ and hence
 * $$mn = \varphi(m)\varphi(n) + \varphi(m) \sum_{d|n, d < n} \varphi(d) + \varphi(n) \sum_{e|m, e < m} \varphi(e) + \sum_{d|n, e|m \atop d < n, e < m} \varphi(d) \varphi(e)$$.

Furthermore, by lemma 2.11 and the bijection from the proof of theorem 2.8,
 * $$mn = \sum_{f | mn} \varphi(f) = \sum_{e|m, d|n} \varphi(ed)$$.

By induction on $$ed, en, md < mn$$ we thus have
 * $$mn = \varphi(mn) + \varphi(m) \sum_{d|n} \varphi(d) + \varphi(n) \sum_{e|m} \varphi(e) + \sum_{e|m, d|n \atop e < m, d < n} \varphi(e) \varphi(d)$$.

Proof 4: We prove the theorem from lemma 2.11 and the Möbius inversion formula.

Indeed, from lemma 2.10 and the Möbius inversion formula, we obtain
 * $$\varphi = \mu * I_1$$,

which is why $$\varphi$$ is multiplicative as the convolution of two multiplicative functions.

Proof 5: We prove the theorem from Euler's product formula.

Indeed, if $$m = P^\kappa$$ and $$n = Q^\iota$$ and $$\gcd(m, n) = 1$$, then $$P \cap Q = \emptyset$$ and hence
 * $$\prod_{p|n} (p^{\kappa_p} - p^{\kappa_p - 1}) \prod_{q|n} (q^{\iota} - q^{\iota_q - 1}) = \varphi(mn)$$.

Proof:

By lemma 2.14 and associativity of convolution,


 * $$\mu * S_f = \mu * f * E = \mu * E * f = \delta * f = f$$.

Proof 1:

We prove the theorem from lemma 2.10 and the fact that $$\varphi$$ is multiplicative.

Indeed, let $$p$$ be a prime number and let $$k \in \mathbb N$$. Then $$\varphi(p^k) = p^k - p^{k-1}$$, since
 * $$\varphi(p^k) = (\mu * I_1)(p^k) = \sum_{j=0}^k \mu(p^j) p^{k-j}$$

by lemma 2.10. Therefore,
 * $$\varphi(n) = \prod_{j=1}^r \left( p_j^{k_j} - p_j^{k_j - 1} \right) = n \prod_{j=1}^r $$,

where the latter equation follows from
 * $$\begin{align}

n \prod_{j=1}^r \left( 1 - \frac{1}{p_j} \right) & = p_1^{k_1} \cdots p_r^{k_r} \prod_{j=1}^r \left( 1 - \frac{1}{p_j} \right) \\ &= \prod_{j=1}^r p_j^{k_j} \left( 1 - \frac{1}{p_j} \right) \\ &= \prod_{j=1}^r \left( p_j^{k_j} - p_j^{k_j - 1} \right) \end{align}$$.

Proof 2:

We prove the identity by the means of probability theory.

Let $$n \in \mathbb N$$, $$n = p_1^{k_1} \cdots p_r^{k_r}$$. Choose $$\Omega = \{1, \ldots, n\}$$, $$\mathcal F = 2^\Omega$$, $$P(A) := \frac{|A|}{n}$$. For $$j \in \{1, \ldots, r\}$$ define the event $$E_{p_j} := \{1 \le k \le n | p_j | n\}$$. Then we have
 * $$P\left( \overline{E_{p_1}} \cap \cdots \cap \overline{E_{p_r}} \right) = \frac{\varphi(n)}{n}$$.

On the other hand, for each $$J = \{j_1, \ldots, j_l\} \subseteq \{1, \ldots, r\}$$, we have
 * $$\begin{align}

P\left(E_{p_{j_1}} \cap \cdots \cap E_{p_{j_1}} \right) & = P \left( \left\{ 1 \le k \le n \big| \prod_{j \in J} p_j | k \right\} \right) \\ & = \frac{1}{\prod_{j \in J} p_j} = \prod_{j \in J} P \left( E_{p_j} \right) \end{align}$$. Thus, it follows that $$E_{p_1}, \ldots, E_{p_r}$$ are independent. But since events are independent if and only if their complements are, we obtain
 * $$\frac{\varphi(n)}{n} = P\left( \overline{E_{p_1}} \cap \cdots \cap \overline{E_{p_r}} \right) = P\left( \overline{E_{p_1}}) \right) \cdots P\left( \overline{E_{p_r}} \right) = \prod_{j=1}^r \left( 1 - \frac{1}{p_j} \right)$$.

Proof 3:

We prove the identity from the Möbius inversion formula and lemmas 2.9 and 2.10.

But by the Möbius inversion formula and since by lemma 2.10 $$S_\varphi = I_1$$,
 * $$\sum_{d|n} \mu(d) \frac{n}{d} = \mu * S_\varphi(n) = \varphi(n)$$.

Proof 4:

We prove the identity from the inclusion–exclusion principle.

Indeed, by one of de Morgan's rules and the inclusion–exclusion principle we have for sets $$A_1, \ldots, A_r \subseteq S$$
 * $$\begin{align}

\left| \bigcap_{j=1}^r A_j \right| & = \left| S \setminus \bigcup_{j=1}^r \left( S \setminus A_j \right) \right| \\ & = |S| - \left| \bigcup_{j=1}^r \left( S \setminus A_j \right) \right| \\ & = |S| + \sum_{\emptyset \neq J \subseteq \{1, \ldots, r\}} (-1)^{|J|} \left| \bigcap_{j \in J} \left( S \setminus A_j \right) \right| \\ & = \sum_{J \subseteq \{1, \ldots, r\}} (-1)^{|J|} \left| \bigcap_{j \in J} \left( S \setminus A_j \right) \right| \end{align}$$, where we use the convention that the empty intersection equals the universal set $$S$$. Let now $$n = p_1^{k_1} \cdots p_r^{k_r}$$, and define $$S = \{m|1 \le m \le n\}$$ and $$A_j := \{l \in S | p_j \not| l\}$$ for $$1 \le j \le r$$. Since
 * $$\varphi(n) = \left| \bigcap_{j=1}^r A_j \right|$$,

we then have
 * $$\varphi(n) = \sum_{J \subseteq \{1, \ldots, r\}} (-1)^{|J|} \left| \bigcap_{j \in J} \left( S \setminus A_j \right) \right|$$.

But for each $$J \subseteq \{1, \ldots, r\}$$, we have
 * $$\begin{align}

\left| \bigcap_{j \in J} \left( S \setminus A_j \right) \right| & = \left\{ 1 \le l \le n \big| \forall j \in J : p_j | l \right\} \\ & = \left\{ 1 \le l \le n \big| \left( \prod_{j \in J} p_j \right) | l \right\} = \frac{n}{\prod_{j \in J} p_j} \end{align}$$. It follows
 * $$\varphi(n) = n \sum_{J \subseteq \{1, \ldots, r\}} (-1)^{|J|} \frac{1}{\prod_{j \in J} p_j}$$,

and since
 * $$\prod{m=1}^r \left(1 - \frac{1}{p_m} \right) = \sum_{J \subseteq \{1, \ldots, r\}} (-1)^{|J|} \frac{1}{\prod_{j \in J} p_j}$$,

the theorem is proven.