Famous Theorems of Mathematics/Number Theory/Totient Function

From testwiki
Jump to navigation Jump to search

This page provides proofs for identities involving the totient function φ(k) and the Möbius function μ(k).

Sum of integers relatively prime to and less than or equal to n

The proof of the identity

1kn(k,n)=1k=12φ(n)n where n2

uses the fact that

(k,n)=d(nk,n)=d

because if d|n and d|k then d|nk and if d|n and d|(nk) then d|n(nk)=k.

This means that for n>2 we may group the k that are relatively prime to n into pairs

(k,nk) where k<nk..

The case k=n/2 does not occur because n/2 is not an integer when n is odd, and when n is even, we have (n/2,n)=n/2>1 because we assumed that n>2. There are

φ(n)2

such pairs, and the constituents of each pair sum to

k+nk=n,

hence

(k,n)=1k=12φ(n)n where n3.

The case n=2 is verified by direct substitution and may be included in the formula.

Proofs of totient identities involving the floor function

The proof of the identity

k=1nφ(k)k=k=1nμ(k)knk

is by mathematical induction on n. The base case is n=1 and we see that the claim holds:

φ(1)/1=1=μ(1)11.

For the induction step we need to prove that

φ(n+1)n+1=k=1nμ(k)k(n+1knk)+μ(n+1)n+1.

The key observation is that

n+1knk={1,if k|(n+1)0,otherwise, 

so that the sum is

k|n+1,k<n+1μ(k)k+μ(n+1)n+1=k|n+1μ(k)k.

Now the fact that

k|n+1μ(k)k=φ(n+1)n+1

is a basic totient identity. To see that it holds, let p1v1p2v2pqvq be the prime factorization of n+1. Then

φ(n+1)n+1=l=1q(11pl)=k|n+1μ(k)k

by definition of μ(k). This concludes the proof.

An alternate proof proceeds by substituting φ(k)k=d|kμ(d)d directly into the left side of the identity, giving k=1nd|kμ(d)d.

Now we ask how often the term μ(d)d occurs in the double sum. The answer is that it occurs for every multiple k of d, but there are precisely nd such multiples, which means that the sum is

d=1nμ(d)dnd

as claimed.


The trick where zero values of n+1knk are filtered out may also be used to prove the identity

k=1nφ(k)=12(1+k=1nμ(k)nk2).

The base case is n=1 and we have

φ(1)=1=12(1+μ(1)112)

and it holds. The induction step requires us to show that

φ(n+1)=12k=1nμ(k)(n+1k2nk2)+12μ(n+1)n+1n+12.

Next observe that

n+1k2nk2={2n+1k1,if k|(n+1)0,otherwise.

This gives the following for the sum

12k|n+1,k<n+1μ(k)(2n+1k1)+12μ(n+1)=12k|n+1μ(k)(2n+1k1).

Treating the two inner terms separately, we get

(n+1)k|n+1μ(k)k12k|n+1μ(k).

The first of these two is precisely φ(n+1) as we saw earlier, and the second is zero, by a basic property of the Möbius function (using the same factorization of n+1 as above, we have k|n+1μ(k)=l=1q(11)=0.) This concludes the proof.

This result may also be proved by inclusion-exclusion. Rewrite the identity as

1+2k=1nφ(k)=k=1nμ(k)nk2.

Now we see that the left side counts the number of lattice points (a, b) in [1,n] × [1,n] where a and b are relatively prime to each other. Using the sets Ap where p is a prime less than or equal to n to denote the set of points where both coordinates are divisible by p we have

|pAp|=p|Ap|p<q|ApAq|+p<q<r|ApAqAr|±|ApAs|.

This formula counts the number of pairs where a and b are not relatively prime to each other. The cardinalities are as follows:

|Ap|=np2,|ApAq|=npq2,|ApAqAr|=npqr2,

and the signs are μ(pqr), hence the number of points with relatively prime coordinates is

μ(1)n2+pμ(p)np2+p<qμ(pq)npq2+p<q<rμ(pqr)npqr2+

but this is precisely k=1nμ(k)nk2 and we have the claim.

Average order of the totient

We will use the last formula of the preceding section to prove the following result:

1n2k=1nφ(k)=3π2+𝒪(lognn)

Using x1<xx we have the upper bound

12n2(1+k=1nμ(k)n2k2)=12n2+12k=1nμ(k)k2

and the lower bound

12n2(1+k=1nμ(k)(n2k22nk+1))

which is

12n2+12k=1nμ(k)k21nk=1nμ(k)k+12n2k=1nμ(k)

Working with the last two terms and using the asymptotic expansion of the nth harmonic number we have

1nk=1nμ(k)k>1nk=1n1k=1nHn>1n(logn+1)

and

12n2k=1nμ(k)>12n.

Now we check the order of the terms in the upper and lower bound. The term k=1nμ(k)k2 is 𝒪(1) by comparison with ζ(2), where ζ(s) is the Riemann zeta function. The next largest term is the logarithmic term from the lower bound.

So far we have shown that

1n2k=1nφ(k)=12k=1nμ(k)k2+𝒪(lognn)

It remains to evaluate k=1nμ(k)k2 asymptotically, which we have seen converges. The Euler product for the Riemann zeta function is

ζ(s)=p(11ps)1 for (s)>1.

Now it follows immediately from the definition of the Möbius function that

1ζ(s)=p(11ps)=n1μ(n)ns.

This means that

12k=1nμ(k)k2=121ζ(2)+𝒪(1n)

where the integral n+11t2dt was used to estimate k>nμ(k)k2. But 121ζ(2)=3π2 and we have established the claim.

Average order of φ(n)/n

The material of the preceding section, together with the identity

k=1nφ(k)k=k=1nμ(k)knk

also yields a proof that

1nk=1nφ(k)k=6π2+𝒪(lognn).

Reasoning as before, we have the upper bound

1nk=1nμ(k)knk=k=1nμ(k)k2

and the lower bound

1nk=1nμ(k)k+k=1n+1μ(k)k2.

Now apply the estimates from the preceding section to obtain the result.

Inequalities

We first show that

liminfφ(n)n=0 and limsupφ(n)n=1.

The latter holds because when n is a power of a prime p, we have

φ(n)n=11p,

which gets arbitrarily close to 1 for p large enough (and we can take p as large as we please since there are infinitely many primes).

To see the former, let nk be the product of the first k primes, call them p1,p2,...,pk. Let

rk=φ(nk)nk=i=1k(11pi).

Then

1rk=i=1k(11pi)1>m=1pk1m=Hpk,

a harmonic number. Hence, by the well-known bound Hn>logn, we have

1rk>logpk.

Since the logarithm is unbounded, taking k arbitrarily large ensures that rk achieves values arbitrarily close to zero.

We use the same factorization of n as in the first section to prove that

6n2π2<φ(n)σ(n)<n2.

Note that

φ(n)σ(n)=nl=1q(11pl)l=1qplvl+11pl1=nl=1qpl1plplvl+11pl1

which is

nl=1q(plvl1pl)=n2l=1q(11plvl+1).

The upper bound follows immediately since

l=1q(11plvl+1)<1.

We come arbitrarily close to this bound when n is prime. For the lower bound, note that

l=1q(11plvl+1)l=1q(11pl2)>p(11p2),

where the product is over all primes. We have already seen this product, as in

p(11ps)=n1μ(n)ns=1ζ(s)

so that

p(11p2)=1ζ(2)=6π2

and we have the claim. The values of n that come closest to this bound are products of the first k primes.

Template:BookCat