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-29

Exercise 1.2.4-29

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 four kinds of functions of a positive integer are multiplicative, that is, f(rs)=f(r)f(s)f(rs) = f(r)f(s) whenever r⊥sr \perp s.

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

For (b) and (c), look at the primes that divide rr and ss. If r⊥sr \perp s, no prime divides both.

Hint 2

For (b), use Euclid's lemma on a prime pp with p2∣rsp^2 \mid rs.

Solution

Show the solution

Let r⊥sr \perp s. Then no prime divides both rr and ss, since it would be a common divisor greater than 11.

(a) f(rs)=(rs)c=rcsc=f(r)f(s)f(rs) = (rs)^c = r^c s^c = f(r) f(s). This holds for any cc and does not use r⊥sr \perp s.

(b) Let f(n)=1f(n) = 1 if no k2k^2 with k>1k > 1 divides nn, and 00 otherwise. If k2∣rk^2 \mid r with k>1k > 1, then k2∣rsk^2 \mid rs. So f(r)=0f(r) = 0 or f(s)=0f(s) = 0 implies f(rs)=0f(rs) = 0, and the product f(r)f(s)f(r)f(s) is 00 as well. Now suppose f(rs)=0f(rs) = 0. Then k2∣rsk^2 \mid rs for some k>1k > 1. Let pp be a prime divisor of kk, so p2∣rsp^2 \mid rs. Since p∣rsp \mid rs, p∣rp \mid r or p∣sp \mid s. Say p∣rp \mid r; then p∤sp \nmid s, so p2⊥sp^2 \perp s (a common prime divisor would be pp). Law B in the form s⋅r≡s⋅0(modp2)s \cdot r \equiv s \cdot 0 \pmod{p^2} shows r≡0(modp2)r \equiv 0 \pmod {p^2}, that is p2∣rp^2 \mid r, and f(r)=0f(r) = 0. The case p∣sp \mid s is the same. So f(rs)=0f(rs) = 0 implies f(r)=0f(r) = 0 or f(s)=0f(s) = 0. Since the values are only 00 and 11, f(rs)=f(r)f(s)f(rs) = f(r) f(s) in all cases.

(c) Let ω(n)\omega(n) be the number of distinct primes that divide nn. The primes that divide rsrs are those that divide rr together with those that divide ss (Euclid's lemma), and the two sets are disjoint. So ω(rs)=ω(r)+ω(s)\omega(rs) = \omega(r) + \omega(s) and cω(rs)=cω(r)cω(s)c^{\omega(rs)} = c^{\omega(r)} c^{\omega(s)}. The value at n=1n = 1 is c0=1c^0 = 1.

(d) If ff and gg are multiplicative, then f(rs)g(rs)=f(r)f(s)g(r)g(s)=(f(r)g(r))(f(s)g(s))f(rs)g(rs) = f(r)f(s)g(r)g(s) = (f(r)g(r))(f(s)g(s)). □\square

Check

For (b): f(30)=1=f(2)f(15)f(30) = 1 = f(2)f(15), and f(12)=0=f(4)f(3)f(12) = 0 = f(4)f(3) with f(4)=0f(4) = 0. For (c) with c=3c = 3: ω(12)=2\omega(12) = 2, ω(35)=2\omega(35) = 2, ω(420)=4\omega(420) = 4, and 34=32⋅323^4 = 3^2 \cdot 3^2. A run over all coprime pairs r,s≤60r, s \le 60 confirms (a) to (d) for c=2c = 2 and c=3c = 3.

Remarks

The function in (b) is the absolute value of the Moebius function μ\mu. Exercise 1.2.4-31 shows that a sum over divisors of a multiplicative function is multiplicative, and Exercise 1.2.4-30 proves that φ\varphi is multiplicative.

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.