Processing math: 100%
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

1.15: Number Theoretic Functions

( \newcommand{\kernel}{\mathrm{null}\,}\)

We will return to the Mersenne primes in the next chapter. Before we do, we introduce a few concepts that will be helpful both then and later in the text.

The prime-counting function π(x) appearing in the Prime Number Theorem (Theorem 1.11.3) and the prime-generating functions imagined and studied in Section 1.14 are by no means the only functions studied in number theory. Mathematicians through history have profitably looked at several additional functions tied to our key questions about the integers. In this chapter we introduce three of these. Though their definitions may seem a bit strange at first, hopefully the results of this chapter and the exercises that follow will convince you that their properties are interesting enough to make studying these functions worthwhile.

We start with two functions related to the positive divisors of an integer n.

Definition 1.15.1

For each integer n>0, define τ(n)=the number of positive divisors of n,σ(n)=the sum of the positive divisors of n.

Example 1.15.1

The integer 12=322 has positive divisors 1,2,3,4,6,12. Hence τ(12)=6 and σ(12)=1+2+3+4+6+12=28.

Definition 1.15.2: Proper Divisor

A positive divisor d of n is said to be a proper divisor of n if d<n. We denote the sum of all proper divisors of n by σ(n).

Note that if n2 then σ(n)=σ(n)n.

Example 1.15.2

Carrying our last example further, σ(12)=16.

The next theorem shows a simple way to compute σ(n) and τ(n) from the prime factorization of n.

Theorem 1.15.1

Let n=pe11pe22perr,r1, where p1<p2<<pr are primes and ei0 for each i{1,2,,r}. Then

  1. τ(n)=(e1+1)(e2+1)(er+1);
  2. σ(n)=(pe1+111p11)(pe2+121p21)(per+1r1pr1).

Proof

(1) From the Fundamental Theorem of Arithmetic, every positive factor d of n will have its prime factors coming from those of n. Hence dn if and only if d=pf11pf22pfrr for some integer exponents fi where for each i, 0fiei. That is, for each fi we can choose a value in the set of ei+1 numbers {0,1,2,,ei}. So, in all, there are (e1+1)(e2+1)(er+1) choices for the exponents f1,f2,,fr, and by the Fundamental Theorem of Arithmetic, each set of choices yields a different factor. So (1) holds.

To prove (2), we first establish two lemmas.

Before proving this let’s look at an example. Take n=72=89=2332. The theorem says that τ(72)=(3+1)(2+1)=12andσ(72)=(24121)(33131)=1513=195. You can compute τ(72) and σ(72) from their original definitions to verify that these results are correct (and much quicker to compute!).

Lemma 1.15.1

Let n=ab where a,b>0 and gcd(a,b)=1. Then σ(n)=σ(a)σ(b).

Proof

Since a and b have only 1 as a positive common factor, using the Fundamental Theorem of Arithmetic it is easy to see that dabd=d1d2 where d1a and d2b. That is, the divisors of ab are products of the divisors of a and the divisors of b. Let 1,a1,,as denote the divisors of a and let 1,b1,,bt denote the divisors of b. Then σ(a)=1+a1+a2++as,σ(b)=1+b1+b2++bt. The divisors of n=ab can be listed as follows 1,b1,b2,,bt,a11,a1b1,a1b2,,a1bt,a21,a2b1,a2b2,,a2bt,as1,asb1,asb2,,asbt. It is important to note that since gcd(a,b)=1, aibj=akb implies that ai=ak and bj=b. That is there are no repetitions in the above array.

If we sum each row we get 1+b1++bt=σ(b)a11+a1b1++a1bt=a1σ(b)as1+asb1++asbt=asσ(b). By adding these partial sums together we get σ(n)=σ(b)+a1σ(b)+a2σ(b)++a3σ(b)=(1+a1+a2++as)σ(b)=σ(a)σ(b). This proves the lemma.

Lemma 1.15.2

If p is a prime and k0 we have σ(pk)=pk+11p1.

Proof

Since p is prime, the divisors of pk are 1,p,p2,,pk. A standard formula for geometric series yields σ(pk)=1+p+p2++pk=pk+11p1, as desired.

Proof of Theorem 1.15.1

Proof

(2) Let n=pe11pe22perr. Our proof is by induction on r. If r=1, n=pe11 and the result follows from Lemma 1.15.2. Suppose the result is true when 1rk. Consider now the case r=k+1. That is, let n=pe11pekkpek+1k+1 where the primes p1,,pk,pk+1 are distinct and ei0. Let a=pe11pekk, b=pek+1k+1. Clearly gcd(a,b)=1. So by Lemma 1.15.1 we have σ(n)=σ(a)σ(b). By the induction hypothesis σ(a)=(pe1+111p11)(pek+1k1pk1) and by Lemma 1.15.2 σ(b)=pek+1+1k+11pk+11 and it follows that σ(n)=(pe1+111p11)(pek+1+1k+11pk+11). So the result holds for r=k+1. By PMI it holds for r1.

The functions σ(n) and σ(n) will appear in the next chapter as we introduce perfect numbers. Additional properties of τ(n) and σ(n) are discussed in the exercises.

Euler’s totient function

The final function we will introduce in this chapter is known as Euler’s phi-function, or the Euler totient function. As opposed to τ and σ, which dealt with divisors of their input, ϕ will deal with numbers that have no prime factor in common with n.

Definition 1.15.3

If X is a set, the number of elements in X is denoted by |X|.

For example, |{1}|=1 and |{0,1,3,9}|=4.

Definition 1.15.4

If m1, the Euler totient function of n is defined by ϕ(n)=|{iZ1in and gcd(i,n)=1}|.

At first glance, ϕ(n) may seem tedious to calculate. For instance, in order to compute ϕ(1000), would a person need to list all numbers relatively prime to 1000 and then count them?

Fortunately, the following theorems show that once the prime factorization of n is given, computing ϕ(n) is easy.

Theorem 1.15.2

If a>0 and b>0 and gcd(a,b)=1, then ϕ(ab)=ϕ(a)ϕ(b).

Theorem 1.15.3

If p is prime and n>0 then ϕ(pn)=pnpn1.

Theorem 1.15.4

Let p1,p2,,pk be distinct primes and let n1,n2,,nk be positive integers, then ϕ(pn11pn22pnkk)=(pn11pn111)(pnkkpnk1k).

Before discussing the proofs of these three theorems, let’s illustrate their use:

ϕ(12)=ϕ(223)=(2221)(3130)=22=4ϕ(9000)=ϕ(235332)=(2322)(5352)(3231)=41006=2400.

Note that if p is any prime then ϕ(p)=p1.

We will postpone a proof of Theorem 1.15.2 until Section 1.23. Here we give the proof of Theorem 1.15.3.

Proof of Theorem 1.15.3

Proof

We want to count the number of elements in the set A={1,2,,pn} that are relatively prime to pn. Let B be the set of elements of A that have a factor greater than 1 in common with A. Note that if bB and gcd(b,pn)=d>1, then d is a factor of pn and d>1 so d has p as a factor. Hence b=pk, for some k, and pbpn, so pkppn. It follows that 1kpn1. That is, B={p,2p,3p,,kp,,pn1p}. We are interested in the number of elements of A not in B. Since |A|=pn and |B|=pn1, this number is pnpn1. That is, ϕ(pn)=pnpn1.

The proof of Theorem 1.15.4 follows from Theorems 1.15.2 and 1.15.3. The proof is by induction on n and is quite similar to the proof of Theorem 1.15.1(2), so we omit the details. Other properties of the ϕ-function are developed in the exercises.

Multiplicative functions

The functions τ, σ, and ϕ all have a common property, shown in Theorem 1.15.1, Lemma 1.15.1, and Theorem 1.15.2.

Definition 1.15.5: Multiplicative

A function f(n) defined for positive integers n is called multiplicative if f(ab)=f(a)f(b) whenever gcd(a,b)=1.

From the results mentioned above, τ, σ, and ϕ are all multiplicative functions. If you are so inclined, do some additional reading on your own to learn about several pleasing properties that multiplicative functions have in common; it will be worth the effort!

Some final words

Later studies in number theory will lead you into greater depth with τ, σ, and ϕ, as well as with the prime-counting function π, and will introduce you to still other functions satisfying remarkable properties. Though we will say little more in this book about number theoretic functions,1 we finish our discussion with an intriguing unsolved problem in number theory.

In 1907 Robert Carmichael announced that he had proved the following statement:

Carmichael's Conjecture

For every positive integer n there exists a different positive integer m for which ϕ(n)=ϕ(m).

In other words, Carmichael’s statement is that if we were to list ϕ(n) for all positive integers n, each value would show up at least twice; every integer shares its ϕ-value with at least one other integer.

Unfortunately, Carmichael’s proof was faulty, and today the conjecture still has not been proved true (or disproved!). In 1998 Kevin Ford proved that if Carmichael’s conjecture is not true, then the the smallest counterexample (i.e., the smallest number n such that no other number has the same ϕ-value as n) must be larger than 101010. That’s huge! On the other hand, mathematicians have shown that if any counterexample exists, then there are infinitely many counterexamples.

You can find more about Carmichael’s conjecture with a quick internet or library search. Happy reading!

Exercises

Exercise 1.15.1

Find σ(n) and τ(n) for the following values of n.

  1. n=900
  2. n=496
  3. n=32
  4. n=128
  5. n=1024
Exercise 1.15.2

Does Lemma 1.15.1 hold if we replace σ by σ?

(Hint: The answer is no, but find explicit numbers a and b such that the result fails yet gcd(a,b)=1.)

Exercise 1.15.3

Prove that τ(n) is odd if and only if n is a square.

Exercise 1.15.4

Prove that d|nd=nτ(n)/2, where the product is over all positive divisors d of n.

Exercise 1.15.5

Observe that n=30 can be written in multiple ways as the sum of one or more consecutive positive integers: 30,9+10+11,6+7+8+9,4+5+6+7+8. Show that for every positive integer n, if n=2pq, where p0 and q is odd, then τ(q) is the number of ways that n can be written as the sum of a sequence of consecutive integers.

(Hint: For multiple values of n, try looking at all the ways that n can be written as a sum of consecutive positive integers. Try to match different sums up with different divisors of q in a way that always works, no matter what n is.)

Exercise 1.15.6

Show that if m=pn11pn22pnkk where p1,,pk are distinct primes and each ni1, then ϕ(m)=m(11p1)(11p2)(11pk).

Exercise 1.15.7

Prove that ϕ(n) is even for all positive integers n other than 1 or 2.

Exercise 1.15.8

Determine, with proof, all numbers n such that

  1. ϕ(n)=2
  2. ϕ(n)=4
  3. ϕ(n)=6
Exercise 1.15.9

Prove that if ϕ(n)(n1), then no prime appears more than once in the prime factorization of n.

Exercise 1.15.10

Let S(n)=dnϕ(d), i.e., S(n) is the sum of the values we get when we evaluate ϕ(d) for all positive divisors d of n. For example, S(4)=ϕ(1)+ϕ(2)+ϕ(4)=1+1+2=4,and S(15)=ϕ(1)+ϕ(3)+ϕ(5)+ϕ(15)=1+2+4+18=15.

Compute S(n) for 1n10 and conjecture2 a formula for S(n).

Exercise 1.15.11

For each function below, decide whether the function is multiplicative or not. (Assume that functions are defined on the set of positive integers.)

  1. f(n)=1
  2. f(n)=n
  3. f(n)=1+n
  4. f(n)=log(n)
  5. f(n)=2n
  6. f(n)=1/n
Exercise 1.15.12

For positive integers n, define the function ρ by ρ(n)=the number of prime factors ofn; for example, ρ(4)=1 (since 4 is divisible by 2 and no other prime) and ρ(100)=2 (since 100 is divisible by 2 and 5 and no other prime).

  1. Is the function ρ(n) multiplicative? Explain why or why not.
  2. Is the function f(n)=(1)ρ(n) multiplicative? Explain why or why not.
Exercise 1.15.13

Show that for any positive integers a and b, if f is a multiplicative function, then f(a)f(b)=f(gcd(a,b))f(lcm(a,b)).

Footnotes

[1] You'll find more, though, in the exercises in this chapter.

[2] Though the proof of your conjecture, once you make it, is a bit beyond the scope of this text, you may find a proof in many other textbooks on number theory.


This page titled 1.15: Number Theoretic Functions is shared under a not declared license and was authored, remixed, and/or curated by Mike Barrus & W. Edwin Clark.

Support Center

How can we help?