Lecture 12 - An Intro to Arithmetic Functions


In today's class we finished our discussion of Euler's $\phi$ function, particularly how one goes about computing $\phi(n)$ for an arbitrary integer n. This left us considering a more general class of functions which share some of the properties of the $\phi$ function. We started investigating these so-called arithmetic functions, and finished with a proposition which gave us one method for constructing a "nice" arithmetic function out of an old "nice" arithmetic function.

Computing Euler's Totient Function

Last class period we finished to computing values of the $\phi$ function for particular classes of integers. We saw

If p is prime, then $\phi(p) = p-1$ and $\phi(p^e) = p^e-p^{e-1}$.

We also found that

If p and q are distinct primes, then $\phi(pq) = \phi(p)\phi(q)$.

On the other hand, we realized that

\begin{align} \phi(12) = \phi(4)\phi(3) \neq \phi(6)\phi(2). \end{align}

Today we started by noting that the perhaps $\phi(12) \neq \phi(6)\phi(2)$ because $(6,2) \neq 1$, whereas perhaps $\phi(12) = \phi(4)\phi(3)$ since $(4,3) = 1$. As further evidence for this conjecture, note that

\begin{align} \phi(p^2) = p^2-p^1 \neq \phi(p)\phi(p), \end{align}

presumably because $(p,p) \neq 1$.

This let us conjecture the following

Theorem: If n and m are relatively prime integers, then $\phi(nm) = \phi(n)\phi(m)$.

Before proving this result, notice that it gives the following

Corollary: If $n = p_1^{e_1}\cdots p_k^{e_k}$, then

$\displaystyle \phi(n) = \phi(p_1^{e_1}\cdots p_k^{e_k}) = \phi\left(p_1^{e_1}\right)\cdots \phi\left(p_k^{e_k}\right).$

In particular, this tells us that

\begin{align} \begin{split} \phi(n) &= \phi\left(\prod_{i=1}^k p_1^{e_1}\cdots p_k^{e_k}\right)\\ &= \phi\left(p_1^{e_1}\right)\cdots\phi\left(p_k^{e_k}\right)\\ &= (p_1^{e_1}-p_1^{e_1-1})\cdots(p_k^{e_k}-p^{e_k-1})\\ &= p_1^{e_1}\cdots p_k^{e_k} \left(1-\frac{1}{p_1}\right)\cdots \left(1-\frac{1}{p_k}\right)\\ &= n \prod_{p \mid n} \left(1-\frac{1}{p}\right). \end{split} \end{align}

Example: Computing $\phi(360)$

Since $360 = 2^33^25$, we have

\begin{align} \phi(360) = \phi(2^3)\phi(3^2)\phi(5) = (2^3-2^2)(3^2-3^1)(5-1) = 96. \end{align}

Alternatively, we could compute $\phi(360)$

\begin{align} \phi(360) = 360 (1-\frac{1}{2})(1-\frac{1}{3})(1-\frac{1}{5}). \end{align}

Either way works, so feel free to compute $\phi(n)$ using whichever technique you prefer. $\square$

Proof of Theorem: Let $(n,m) = 1$. Using the Chinese Remainder Theorem, we know that an integer a with $1 \leq a \leq nm$ amounts to a pair of integers $a_1,a_2$ so that

\begin{split} a &\equiv a_1 \mod{n}\\ a &\equiv a_2 \mod{m}. \end{split}

We claim that, in fact, one has $(a,nm) = 1$ if and only if $(a_1,n) =1$ and $(a_2,m) = 1$.

To prove this claim, suppose first that $(a,nm) = 1$. Hence there exist integers x and y so that

\begin{equation} xa + ynm = 1. \end{equation}

Since $a \equiv a_1 \mod{n}$, there exists some integer k with $a = a_1 + kn$, and plugging this into the above equation yields

\begin{equation} x(a_1 + kn) + y(nm) = xa_1 + (xk + ym)n = 1. \end{equation}

Since we've written 1 as an integral linear combination of $a_1$ and n, this tells us that $(a_1,n) = 1$. In a similar way, we can also prove that $(a_2,m) = 1$. Hence we know that

\begin{align} (a,nm) = 1 \LongRightarrow (a_1,n) = (a_2,m) = 1. \end{align}

For the other direction, suppose we know that $(a_1,n) = (a_2,m) = 1$. This means we integers x,y, w and z so that

\begin{split} xa_1+yn &= 1\\ wa_2 + zm &=1. \end{split}

Since $a \equiv a_1 \mod{n}$ we also know that there exists an integer k so that $a_1 = a+kn$, and likewise $a \equiv a_2 \mod{m}$ means there is some integer s so that $a_2 = a+sm$. Plugging these into the previous equations then gives

\begin{split} xa_1+yn &= 1\\ wa_2 + zm &=1. \end{split}

Now we can multiply left and right hand sides, combining terms as appropriate, to get

\begin{equation} a(xam+xaw+xknw+axmw+wyn) + nm(xkz+xkws+wsy+yz) = 1 \end{equation}

Since this is an integral linear combination of a and nm which equals 1, we have that $(a,nm) = 1$ as desired.

Now that we've justified our claim, let's use it to prove that

\begin{align} \phi(nm) = \phi(n)\phi(m). \end{align}

Now the left hand side of this equation counts the numbers a so that $1 \leq a \leq nm$ and so that $(a,nm) = 1$. On the other hand, the previous claim says that a number a with $1 \leq a \leq nm$ and $(a,nm) = 1$ corresponds to numbers $a_1,a_2$ with $1 \leq a_1 \leq n$ and $1 \leq a_2 \leq m$ and so that $(a_1,n) = (a_2,m) = 1$. How many choices of $a_1,a_2$ can we make? By definition, there are $\phi(n)$ many choices for $a_1$ and $\phi(m)$ many choices for $a_2$. Since the choice of $a_1$ can be made independently of the choice of $a_2$, this tells us that we have a total of

\begin{align} \phi(n)\phi(m) \end{align}

choices for a. This gives the desired equality. $\square$

Arithmetic Functions

The $\phi$ function is a very powerful number-theoretic function, but it is only one example of a class of functions which number theorists are interested in.

Arithmetic functions

Having played with Euler's $\phi$ function for a while, we're now ready to think about more functions on the integers. We start with a basic

Definition: A function whose domain is the positive integers is called an arithmetic function.

There are, of course, loads and loads of arithmetic functions. For instance, your old favorite $f(x) = x^2$ becomes an arithmetic function when you only evaluate it on integers. Typically, though, number theorists are more interested in the functions which are connected to number-theoretic properties. For instance, here are a smattering of arithmetic functions which number theorists get really excited about

Function Name What it does
$\phi$ Counts congruence classes relatively prime to n
$\nu$ Counts the number of divisors
$\sigma$ Computes the sum of divisors
$\sigma_k$ Computes the sum of kth powers of divisors

Example: Computing the value of some arithmetic functions

Just to get some practice, let's evaluate some of the functions above at $n = 6$

\begin{split} \phi(6) &= 2\\ \nu(6) &=4 \quad \mbox{since the divisors of 6 are 1,2,3 and 6}\\ \sigma(6) &= 1+2+3+6 = 12 \\ \sigma_2(6) &= 1^2+2^2+3^2+6^2 \end{split}


We'll eventually talk about all these functions, but first we want to discuss arithmetic functions more generally.

Properties of Arithmetic Functions

One of the important properties that nearly all the arithmetic functions we'll deal with share is that they somehow respect multiplication, by which I mean one can often evaluate an arithmetic function for a composite number by evaluating it on primes (or powers of primes).

Definition: An arithmetic function f is called multiplicative if $f(nm) = f(n)f(m)$ whenever $(n,m) = 1$. An arithmetic function g is called completely multiplicative if $g(nm) = g(n)g(m)$ for all pairs of integers n and m.

We have already seen that $\phi$ is a multiplicative function. The benefit of multiplicativity is the following

Lemma: If f is an arithmetic function and $n = p_1^{a_1}\cdots p_k^{a_k}$, then

$f(n) = f(p_1^{a_1})\cdots f(p_k^{a_k})$.

If g is completely multiplicative, then we have

$g(n) = g(p_1)^{a_1}\cdots g(p_k)^{a_k}$

We'll finish our discussion of arithmetic functions by stated the following useful

Proposition: If f is a multiplicative function, then

$F(n) = \sum_{d \mid n} f(n)$

is also a multiplicative function.

It's worth noting that our notation in the above sum means that d ranges over only positive divisors of n. We'll prove this result in class next time, but we'll use it now to verify the following

Corollary: For any integer n,

$\displaystyle n = \sum_{d \mid n} \phi(n)$

Example $\sum_{d \mid 12} \phi(d)$

The positive divisors of 12 are 1,2,3,4,6 and 12. So let's compute the sum of $\phi$ on each of these divisors:

\begin{align} \phi(1) + \phi(2) + \phi(3) + \phi(4) + \phi(6) + \phi(12) = 1 + 1 + 2 + 2 + 2 + 4 = 12. \end{align}

Just as the lemma predicted!$\square$

Proof of Corollay:
We'll start by letting $F(n)$ be the function

\begin{align} F(n) := \sum_{d \mid n} \phi(d). \end{align}

By the previous proposition, we know that $F(n)$ is multiplicative, and therefore it follows that if $n = p_1^{e_1}\cdots p_k^{e_k}$, we have

\begin{align} F(n) = F(p_1^{e_1})\cdots F(p_k^{e_k}). \end{align}

Therefore we can compute $F(n)$ simply by evaluating F at prime powers.

So let's do it. Let p be prime, and let's compute $F(p^e)$. Since the sum in the expression for $F(p^e)$ runs over positive divisors of $p^e$, we need to start by listing these divisors. Since p is prime, the divisors are just the powers of p between 1 and $p^e$: $\{1,p,p^2,\cdots,p^e\}$. Hence

\begin{split} F(p^e) &= \sum_{d \mid p^e} \phi(d) \\ &= \phi(1)+\phi(p)+\phi(p^2)+\phi(p^3) + \cdots + \phi(p^{e-1} + \phi(p^e)\\ &= 1 + (p-1) + (p^2-p) + (p^3-p^2) + \cdots + (p^{e-1}-p^{e-2}) + (p^e-p^{e-1}). \end{split}

In this last sum, notice that we get lots of cancellation: the 1 from $\phi(1)$ cancels the -1 from $\phi(p)$, the p in $\phi(p)$ is cancelled by the -p in $\phi(p^2)$, and so on down the line. The only thing that survives the massacre is the $p^e$ term from $\phi(p^e)$, and so we have

\begin{equation} F(p^e) = p^e. \end{equation}

With the value of F at prime powers determined, we can now go back and compute

\begin{split} F(n) &= F(p_1^{e_1})\cdots F(p_k^{e_k}) \\ &= p_1^{e_1}\cdots p_k^{e_k} \\ &=n. \end{split}


Add a New Comment
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License