1.1.5. Some number-theoretic functions

This section is based on [BUR11, Sec. 6.1].

All divisors considered in this section are assumed to be positive.

Definition 1.1.5.1.

A number-theoretic function, also called an arithmetic function, is a function f:ℤ+→ℝ{f\colon\mathbb{Z}_{+}\to\mathbb{R}}.

Remark 1.1.5.2.

Number-theoretic functions are often defined to have codomain ℂ\mathbb{C}, the field of complex numbers. We do not need this additional generality in this course.

Example 1.1.5.3.

These are examples of number-theoretic functions:

n⟼n,n⟼1,n⟼n2,…n\longmapsto n,\qquad n\longmapsto 1,\qquad n\longmapsto n^{2},\quad\ldots
Definition 1.1.5.4.

For a positive integer nn, define

τ⁢(n)\displaystyle\tau(n) ≔∑d∣n1=#⁢{d∈ℤ+:d∣n},\displaystyle\coloneqq\sum_{d\mid n}1=\#\{d\in\mathbb{Z}_{+}\colon{d\mid n}\}, σ⁢(n)\displaystyle\sigma(n) ≔∑d∣nd.\displaystyle\coloneqq\sum_{d\mid n}d.

Thus, τ⁢(n)\tau(n) is the number of positive divisors of nn, and σ⁢(n)\sigma(n) is their sum.

Example 1.1.5.5.

We compute τ⁢(n)\tau(n) and σ⁢(n)\sigma(n) for small values of nn:

nn divisors τ⁢(n)\tau(n) σ⁢(n)\sigma(n)
1 1 1 1
2 1,2 2 3
3 1,3 2 4
4 1,2,4 3 7
5 1,5 2 6
6 1,2,3,6 4 12
Proposition 1.1.5.6.

Let nn be a positive integer. Then

n⁢ is a prime number⟺τ⁢(n)=2⟺σ⁢(n)=n+1.n\text{ is a prime number}\quad\Longleftrightarrow\quad\tau(n)=2\quad% \Longleftrightarrow\quad\sigma(n)=n+1.
Proof.

The equivalence ‘n⁢ is prime⟺τ⁢(n)=2{n\text{ is prime}\Longleftrightarrow\tau(n)=2}’ is precisely the definition of prime (τ⁢(n)=2{\tau(n)=2} implies n>1{n>1}).

We now prove the equivalence ‘n⁢ is prime⟺σ⁢(n)=n+1{n\text{ is prime}\Longleftrightarrow\sigma(n)=n+1}’. Clearly, if nn is prime, then σ⁢(n)=n+1{\sigma(n)=n+1}. Conversely, σ⁢(n)=n+1{\sigma(n)=n+1} implies that n>1{n>1} (since σ⁢(1)=1{\sigma(1)=1}). Hence, nn admits at least two distinct positive divisors 11 and nn, and σ⁢(n)=n+1{\sigma(n)=n+1} implies that these are all of them. ∎

Theorem 1.1.5.7.

Let n>1{n>1} be an integer and n=p1a1⁢⋯⁢pkak{n=p_{1}^{a_{1}}\cdots p_{k}^{a_{k}}} be its prime factorisation. Then

τ⁢(n)=∏i=1k(ai+1)andσ⁢(n)=∏i=1kpiai+1−1pi−1.\displaystyle\tau(n)=\prod_{i=1}^{k}(a_{i}+1)\qquad\text{and}\qquad\sigma(n)=% \prod_{i=1}^{k}\frac{p_{i}^{a_{i}+1}-1}{p_{i}-1}.
Proof.

We compute τ⁢(n)\tau(n). By Corollary 1.1.4.9 and the uniqueness of prime factorisations, the function

{(b1,…,bk)∈ℤk:0≤bi≤ai}\displaystyle\{(b_{1},\dots,b_{k})\in\mathbb{Z}^{k}\colon{0\leq b_{i}\leq a_{i% }}\} ⟶{d∈ℤ+:d∣n}\displaystyle\longrightarrow\{d\in\mathbb{Z}_{+}\colon{d\mid n}\}
(b1,…,bk)\displaystyle(b_{1},\dots,b_{k}) ⟼p1b1⁢⋯⁢pkbk\displaystyle\longmapsto p_{1}^{b_{1}}\cdots p_{k}^{b_{k}}

is bijective. Then

τ⁢(n)\displaystyle\tau(n) =#⁢{d∈ℤ+:d∣n}\displaystyle=\#\{d\in\mathbb{Z}_{+}\colon{d\mid n}\}
=#⁢{(b1,…,bk)∈ℤk:0≤bi≤ai}\displaystyle=\#\{(b_{1},\dots,b_{k})\in\mathbb{Z}^{k}\colon{0\leq b_{i}\leq a% _{i}}\}
=(a1+1)⁢(a2+1)⁢⋯⁢(ak+1)\displaystyle=(a_{1}+1)(a_{2}+1)\cdots(a_{k}+1)
=∏i=1k(ai+1).\displaystyle=\prod_{i=1}^{k}(a_{i}+1).

We compute σ⁢(n)\sigma(n). Again by Corollary 1.1.4.9,

σ⁢(n)\displaystyle\sigma(n) =∑d∣nd=∑0≤bi≤aip1b1⁢p2b2⁢⋯⁢pkbk.\displaystyle=\sum_{d\mid n}d=\sum_{0\leq b_{i}\leq a_{i}}p_{1}^{b_{1}}p_{2}^{% b_{2}}\cdots p_{k}^{b_{k}}.

The right-hand side equals

(1+p1+p12+⋯+p1a1)⁢(1+p2+p22+⋯+p2a2)⁢⋯⁢(1+pk+pk2+⋯+pkak).(1+p_{1}+p_{1}^{2}+\cdots+p_{1}^{a_{1}})(1+p_{2}+p_{2}^{2}+\cdots+p_{2}^{a_{2}% })\cdots(1+p_{k}+p_{k}^{2}+\cdots+p_{k}^{a_{k}}).

This can be seen by expanding the product. Recall the finite geometric-series formula (for x≠1{x\neq 1} and integers a≥0{a\geq 0})

1+x+x2+⋯+xa=xa+1−1x−1.1+x+x^{2}+\cdots+x^{a}=\frac{x^{a+1}-1}{x-1}.

Combining the above, we obtain the equality

σ⁢(n)=∏i=1kpiai+1−1pi−1.∎\sigma(n)=\prod_{i=1}^{k}\frac{p_{i}^{a_{i}+1}-1}{p_{i}-1}.\qed
Corollary 1.1.5.8.

Let n≥1{n\geq 1} be an integer and n=pa{n=p^{a}} with pp a prime and a≥0{a\geq 0} an integer. Then

τ⁢(n)=a+1andσ⁢(n)=pa+1−1p−1.\tau(n)=a+1\qquad\text{and}\qquad\sigma(n)=\frac{p^{a+1}-1}{p-1}.
Proof.

If a=0{a=0}, then n=1{n=1} and τ⁢(n)=σ⁢(n)=1{\tau(n)=\sigma(n)=1} agrees with the formulas in the statement. If a>0{a>0}, then the result is a special case of Theorem 1.1.5.7. ∎

Corollary 1.1.5.9.

Let n>1{n>1} be an integer and n=p1a1⁢⋯⁢pkak{n=p_{1}^{a_{1}}\cdots p_{k}^{a_{k}}} be its prime factorisation. Then

τ⁢(n)=∏i=1kτ⁢(piai)andσ⁢(n)=∏i=1kσ⁢(piai).\tau(n)=\prod_{i=1}^{k}\tau(p_{i}^{a_{i}})\qquad\text{and}\qquad\sigma(n)=% \prod_{i=1}^{k}\sigma(p_{i}^{a_{i}}).
Proof.
Warning 1.1.5.10.

Let pp be a prime and a≥1{a\geq 1} an integer. In general,

τ⁢(pa)≠τ⁢(p)aandσ⁢(pa)≠σ⁢(p)a.\tau(p^{a})\neq\tau(p)^{a}\qquad\text{and}\qquad\sigma(p^{a})\neq\sigma(p)^{a}.

For example,

τ⁢(22)=3≠4=22=τ⁢(2)2andσ⁢(22)=7≠9=32=σ⁢(2)2.\tau(2^{2})=3\neq 4=2^{2}=\tau(2)^{2}\qquad\text{and}\qquad\sigma(2^{2})=7\neq 9% =3^{2}=\sigma(2)^{2}.
Example 1.1.5.11.

Not covered in the lectureWe have seen in Example 1.1.4.10 that the integer

504=23⋅32⋅7504=2^{3}\cdot 3^{2}\cdot 7

admits τ⁢(504)=24=4⋅3⋅2{\tau(504)=24=4\cdot 3\cdot 2} positive divisors. Using Theorem 1.1.5.7, the sum of these divisors is

σ⁢(504)=24−12−1⋅33−13−1⋅72−17−1=15⋅13⋅8=1560.\sigma(504)=\frac{2^{4}-1}{2-1}\cdot\frac{3^{3}-1}{3-1}\cdot\frac{7^{2}-1}{7-1% }=15\cdot 13\cdot 8=1560.
Definition 1.1.5.12.

A number-theoretic function ff is multiplicative if for all a,b∈ℤ+{a,b\in\mathbb{Z}_{+}} such that gcd⁡(a,b)=1{\gcd(a,b)=1}, we have f⁢(a⁢b)=f⁢(a)⁢f⁢(b){f(ab)=f(a)f(b)}. In symbols:

∀a,b∈ℤ+⁢(gcd⁡(a,b)=1⟹f⁢(a⁢b)=f⁢(a)⁢f⁢(b)).\forall a,b\in\mathbb{Z}_{+}\ (\gcd(a,b)=1\quad\Longrightarrow\quad f(ab)=f(a)% f(b)).

We say that ff is completely multiplicative if

∀a,b∈ℤ+,f⁢(a⁢b)=f⁢(a)⁢f⁢(b).\forall a,b\in\mathbb{Z}_{+},\quad f(ab)=f(a)f(b).
Example 1.1.5.13.

The identity function n↦n{n\mapsto n} and the constant function n↦1{n\mapsto 1} are completely multiplicative.

Remark 1.1.5.14.

Every completely multiplicative number-theoretic function is multiplicative. The converse is false; see 1.1.5.10 and Corollary 1.1.5.18.

Lemma 1.1.5.15.

Let f≠0{f\neq 0} be a multiplicative number-theoretic function. Then f⁢(1)=1{f(1)=1}.

Proof.

Since f≠0{f\neq 0}, there exists a∈ℤ+{a\in\mathbb{Z}_{+}} such that f⁢(a)≠0{f(a)\neq 0}. Since

gcd⁡(a,1)=1\gcd(a,1)=1

and ff is multiplicative,

f⁢(a)=f⁢(a⋅1)=f⁢(a)⋅f⁢(1).f(a)=f(a\cdot 1)=f(a)\cdot f(1).

Since f⁢(a)≠0{f(a)\neq 0}, we may cancel it on both sides to obtain f⁢(1)=1{f(1)=1}. ∎

Proposition 1.1.5.16.

Let f≠0{f\neq 0} be a number-theoretic function. The following are equivalent:

  1. (1)
    ​

    ff is multiplicative.

  2. (2)
    ​

    f⁢(1)=1{f(1)=1} and if n>1{n>1} has prime factorisation n=p1a1⁢⋯⁢pkak{n=p_{1}^{a_{1}}\cdots p_{k}^{a_{k}}}, then

    f⁢(n)=∏i=1kf⁢(piai).f(n)=\prod_{i=1}^{k}f(p_{i}^{a_{i}}).
Proof.

(1)⇒{\Rightarrow}(2) Lemma 1.1.5.15 shows that f⁢(1)=1{f(1)=1}. Let n>1{n>1} have prime factorisation n=p1a1⁢⋯⁢pkak{n=p_{1}^{a_{1}}\cdots p_{k}^{a_{k}}}. Since gcd⁡(piai,pjaj)=1{\gcd(p_{i}^{a_{i}},p_{j}^{a_{j}})=1} for i≠j{i\neq j} and ff is multiplicative by assumption, induction on k≥1{k\geq 1} gives

f⁢(n)=f⁢(p1a1⁢⋯⁢pkak)=f⁢(p1a1)⁢⋯⁢f⁢(pkak)=∏i=1kf⁢(piai).f(n)=f(p_{1}^{a_{1}}\cdots p_{k}^{a_{k}})=f(p_{1}^{a_{1}})\cdots f(p_{k}^{a_{k% }})=\prod_{i=1}^{k}f(p_{i}^{a_{i}}).

(2)⇒{\Rightarrow}(1) Let m,n∈ℤ+{m,n\in\mathbb{Z}_{+}} with gcd⁡(m,n)=1{\gcd(m,n)=1}. Since f⁢(1)=1{f(1)=1} by assumption, if m=1{m=1} or n=1{n=1}, clearly f⁢(m⁢n)=f⁢(m)⁢f⁢(n){f(mn)=f(m)f(n)}. Otherwise, n,m>1{n,m>1} admit prime factorisations

m=p1a1⁢⋯⁢pkakandn=q1b1⁢⋯⁢qℓbℓ.m=p_{1}^{a_{1}}\cdots p_{k}^{a_{k}}\qquad\text{and}\qquad n=q_{1}^{b_{1}}% \cdots q_{\ell}^{b_{\ell}}.

Since gcd⁡(m,n)=1{\gcd(m,n)=1}, pi≠qj{p_{i}\neq q_{j}} for all 1≤i≤k{1\leq i\leq k} and for all 1≤j≤ℓ{1\leq j\leq\ell}. Consequently, ignoring the order of the factors, m⁢nmn has prime factorisation

m⁢n=p1a1⁢⋯⁢pkak⁢q1b1⁢⋯⁢qℓbℓ.mn=p_{1}^{a_{1}}\cdots p_{k}^{a_{k}}q_{1}^{b_{1}}\cdots q_{\ell}^{b_{\ell}}.

Therefore,

f⁢(m⁢n)\displaystyle f(mn) =f⁢(p1a1⁢⋯⁢pkak⁢q1b1⁢⋯⁢qℓbℓ)\displaystyle=f(p_{1}^{a_{1}}\cdots p_{k}^{a_{k}}q_{1}^{b_{1}}\cdots q_{\ell}^% {b_{\ell}})
=f⁢(p1a1)⁢⋯⁢f⁢(pkak)⁢f⁢(q1b1)⁢⋯⁢f⁢(qℓbℓ)\displaystyle=f(p_{1}^{a_{1}})\cdots f(p_{k}^{a_{k}})f(q_{1}^{b_{1}})\cdots f(% q_{\ell}^{b_{\ell}})
=f⁢(p1a1⁢⋯⁢pkak)⁢f⁢(q1b1⁢⋯⁢qℓbℓ)\displaystyle=f(p_{1}^{a_{1}}\cdots p_{k}^{a_{k}})f(q_{1}^{b_{1}}\cdots q_{% \ell}^{b_{\ell}})
=f⁢(m)⁢f⁢(n).\displaystyle=f(m)f(n).

Here, we use the assumption in (2) in the second and third equalities. This shows that ff is multiplicative. ∎

Corollary 1.1.5.17.

Let ff and gg be multiplicative number-theoretic functions. Then f=g{f=g} if and only if f⁢(pa)=g⁢(pa){f(p^{a})=g(p^{a})} for all primes pp and all integers a≥0{a\geq 0}.

Proof.

If f⁢(1)=g⁢(1)=0{f(1)=g(1)=0}, then f=g=0{f=g=0} since f⁢(n)=f⁢(n)⁢f⁢(1){f(n)=f(n)f(1)} and g⁢(n)=g⁢(n)⁢g⁢(1){g(n)=g(n)g(1)}. Otherwise, f,g≠0{f,g\neq 0} and the claim is immediate from Proposition 1.1.5.16 and the Fundamental Theorem of Arithmetic (Theorem 1.1.4.5). ∎

Corollary 1.1.5.18.

The number-theoretic functions τ\tau and σ\sigma are multiplicative.

Proof.
Theorem 1.1.5.19.

Let ff be a multiplicative number-theoretic function. Then the function

F:n⟼∑d∣nf⁢(d)F\colon n\longmapsto\sum_{d\mid n}f(d)

is also multiplicative.

End of Lecture 4

Proof.

Let m,n∈ℤ+{m,n\in\mathbb{Z}_{+}} be such that gcd⁡(m,n)=1{\gcd(m,n)=1}. Then

F⁢(m⁢n)\displaystyle F(mn) =∑d∣m⁢nf⁢(d)\displaystyle=\sum_{d\mid mn}f(d)
=∑d1∣md2∣nf⁢(d1⁢d2)\displaystyle=\sum_{\begin{subarray}{c}d_{1}\mid m\\ d_{2}\mid n\end{subarray}}f(d_{1}d_{2})
=∑d1∣md2∣nf⁢(d1)⁢f⁢(d2)\displaystyle=\sum_{\begin{subarray}{c}d_{1}\mid m\\ d_{2}\mid n\end{subarray}}f(d_{1})f(d_{2})
=(∑d1∣mf⁢(d1))⁢(∑d2∣nf⁢(d2))\displaystyle=\Big{(}\sum_{d_{1}\mid m}f(d_{1})\Big{)}\Big{(}\sum_{d_{2}\mid n% }f(d_{2})\Big{)}
=F⁢(m)⁢F⁢(n).\displaystyle=F(m)F(n).

Here:

  • •
    ​

    The first and last equalities follow from the definition of FF.

  • •
    ​

    The second equality follows from Corollary 1.1.4.12.

  • •
    ​

    The third equality uses the multiplicativity of ff and gcd⁡(d1,d2)=1{\gcd(d_{1},d_{2})=1} (the latter holds since gcd⁡(m,n)=1{\gcd(m,n)=1}).

  • •
    ​

    The fourth equality uses the distributivity of the product over the sum.

This finishes the proof. ∎

Warning 1.1.5.20.

If ff is a completely multiplicative number-theoretic function, it does not follow that

F:n⟼∑d∣nf⁢(d)F\colon n\longmapsto\sum_{d\mid n}f(d)

is completely multiplicative. For example, the function f:n↦1{f\colon n\mapsto 1} is completely multiplicative, but the function

F:n⟼∑d∈ℤ+,d∣n1=τ⁢(n)F\colon n\longmapsto\sum_{d\in\mathbb{Z}_{+},\ d\mid n}1=\tau(n)

is not; see 1.1.5.10.

Remark 1.1.5.21.

Since the functions n↦1{n\mapsto 1} and n↦n{n\mapsto n} are multiplicative, by Theorem 1.1.5.19 the functions

n⟼∑d∣n1=τ⁢(n)andn⟼∑d∣nd=σ⁢(n)n\longmapsto\sum_{d\mid n}1=\tau(n)\qquad\text{and}\qquad n\longmapsto\sum_{d% \mid n}d=\sigma(n)

are also multiplicative. This gives a different proof of Corollary 1.1.5.18.

Remark 1.1.5.22.

The converse to Theorem 1.1.5.19 also holds. We prove it in Theorem 1.1.6.10.

We illustrate the utility of Corollary 1.1.5.17 through an example.

Example 1.1.5.23.

Let nn be a positive integer. We show that

∑d∣n1d=σ⁢(n)n.\sum_{d\mid n}\frac{1}{d}=\frac{\sigma(n)}{n}.

Define the number-theoretic functions

F:n⟼∑d∣n1dandG:n⟼σ⁢(n)n.F\colon n\longmapsto\sum_{d\mid n}\frac{1}{d}\qquad\text{and}\qquad G\colon n% \longmapsto\frac{\sigma(n)}{n}.

We need to prove that F⁢(n)=G⁢(n){F(n)=G(n)} for all n∈ℤ+{n\in\mathbb{Z}_{+}}. We have F⁢(1)=1=G⁢(1){F(1)=1=G(1)}.

Since the function f:n↦1n{f\colon n\mapsto\frac{1}{n}} is multiplicative, the function FF is multiplicative by Theorem 1.1.5.19. Since σ\sigma is multiplicative (Corollary 1.1.5.18), the function GG is also multiplicative. By Corollary 1.1.5.17, it is enough to show that F⁢(pa)=G⁢(pa){F(p^{a})=G(p^{a})} for all primes pp and all integers a≥1{a\geq 1}. Using Corollary 1.1.4.9,

F⁢(pa)=∑d∣pa1d=∑k=0a1pk=1+1p+1p2+⋯+1paF(p^{a})=\sum_{d\mid p^{a}}\frac{1}{d}=\sum_{k=0}^{a}\frac{1}{p^{k}}=1+\frac{1% }{p}+\frac{1}{p^{2}}+\cdots+\frac{1}{p^{a}}

and

G⁢(pa)=1pa⁢σ⁢(pa)=1pa⁢(1+p+p2+⋯+pa)=1pa+1pa−1+⋯+1p+1.G(p^{a})=\frac{1}{p^{a}}\sigma(p^{a})=\frac{1}{p^{a}}(1+p+p^{2}+\cdots+p^{a})=% \frac{1}{p^{a}}+\frac{1}{p^{a-1}}+\cdots+\frac{1}{p}+1.

Therefore, F⁢(pa)=G⁢(pa){F(p^{a})=G(p^{a})}. Alternatively, using the equality

{d∈ℤ+:d∣n}={nk:k∈ℤ+⁢ and ⁢k∣n},\{d\in\mathbb{Z}_{+}\colon{d\mid n}\}=\{\tfrac{n}{k}\colon{k\in\mathbb{Z}_{+}% \text{ and }k\mid n}\},

one can give a direct argument that avoids the use of the multiplicative property. We encourage the reader to compare both approaches.