taocp

This site has no text of the book. Keep your own copy of TAOCP next to it. See what is checked.

Exercise · Volume 1 · 1.2.4-31

Exercise 1.2.4-31

proved in Lean solution written

RatingM22
MarkersM (mathematical)
KindK1, prove: show that a stated fact is true from the written solution
SectionSection 1.2.4 of Volume 1. Companion chapter: Integer functions and elementary number theory

The task

Show that if ff is multiplicative, then the divisor sum g(n)=∑d∣nf(d)g(n) = \sum_{d \mid n} f(d) is also multiplicative.

The exact wording is in your copy of the book.

Hints

Open one hint at a time. Try the exercise again after each.

Hint 1

Let m⊥nm \perp n. Look at how a divisor of mnmn splits into a divisor of mm and a divisor of nn.

Hint 2

Show that d↦(gcd⁡(d,m),gcd⁡(d,n))d \mapsto (\gcd(d, m), \gcd(d, n)) is a one-to-one correspondence between the divisors of mnmn and the pairs (divisor of mm, divisor of nn).

Hint 3

Then f(ab)=f(a)f(b)f(ab) = f(a)f(b) for each pair, because a⊥ba \perp b.

Solution

Show the solution

Let m⊥nm \perp n be positive integers. Call D(k)D(k) the set of positive divisors of kk.

Step 1: the correspondence. Define Φ:D(m)×D(n)→D(mn)\Phi : D(m) \times D(n) \to D(mn) by Φ(a,b)=ab\Phi(a, b) = ab. It is well defined, since ab∣mnab \mid mn.

It is onto. Let d∣mnd \mid mn. Put a=gcd⁡(d,m)a = \gcd(d, m) and b=gcd⁡(d,n)b = \gcd(d, n). Then a∣ma \mid m, b∣nb \mid n, and a⊥ba \perp b, since a common divisor of aa and bb divides both mm and nn. Both aa and bb divide dd and they are coprime, so ab∣dab \mid d. Conversely, let pep^e be the exact power of a prime pp in dd. Then pp divides mnmn, so it divides mm or nn by Euclid's lemma, and not both since m⊥nm \perp n. Say p∣mp \mid m. Then pe⊥np^e \perp n and pe∣mnp^e \mid mn, so pe∣mp^e \mid m by Law B, and pe∣gcd⁡(d,m)=ap^e \mid \gcd(d, m) = a. So each prime power of dd divides aa or bb, and d∣abd \mid ab. Hence d=abd = ab.

It is one-to-one. If ab=a′b′ab = a'b' with a,a′∣ma, a' \mid m and b,b′∣nb, b' \mid n, then a∣a′b′a \mid a'b' and a⊥b′a \perp b' (as a∣ma \mid m and b′∣nb' \mid n), so a∣a′a \mid a' by Euclid's lemma. In the same way a′∣aa' \mid a. Hence a=a′a = a' and then b=b′b = b'.

Step 2: the sum. For each pair (a,b)∈D(m)×D(n)(a, b) \in D(m) \times D(n) the factors satisfy a⊥ba \perp b, so f(ab)=f(a)f(b)f(ab) = f(a)f(b). By Step 1,

g(mn)=∑d∣mnf(d)=∑a∣m∑b∣nf(ab)=∑a∣mf(a)∑b∣nf(b)=g(m)g(n).g(mn) = \sum_{d \mid mn} f(d) = \sum_{a \mid m}\sum_{b \mid n} f(ab) = \sum_{a \mid m} f(a) \sum_{b \mid n} f(b) = g(m)g(n).

So g(mn)=g(m)g(n)g(mn) = g(m)g(n) for coprime mm, nn, and gg is multiplicative. □\square

Check

Take f=φf = \varphi. Then g(n)=ng(n) = n for all n≤199n \le 199 in a computer run, and the identity function is multiplicative. For f(d)=1f(d) = 1 the sum is the number of divisors: g(12)=6=g(3)g(4)=2⋅3g(12) = 6 = g(3) g(4) = 2 \cdot 3.

Remarks

For f=φf = \varphi this gives ∑d∣nφ(d)=n\sum_{d \mid n}\varphi(d) = n once it is known on prime powers, as noted in Exercise 1.2.4-30. For a prime power pep^e the sum telescopes: 1+(p−1)+(p2−p)+⋯+(pe−pe−1)=pe1 + (p - 1) + (p^2 - p) + \cdots + (p^e - p^{e-1}) = p^e.

This solution is checked, and a person has not reviewed it yet. The source.

In Lean

proved The statement and its proof are in Lean. The kernel accepts the proof, and it uses the standard axioms only.

The status is computed from the Lean build. The node of the map.

Something is wrong? Report it.