# Summary

In today's class we finished talking about convolutions, with the highlight being the proof and a few applications of the Mobius Inversion Formula. Afterwards we talked about quadratic congruences, ultimately defining and playing around with so-called quadratic residues.

# Mobius Inversion

Last class period we finished by stating the following

Theorem (MIF): If

fandgare arithmetic functions, then$\displaystyle f(n) = \sum_{d \mid n}g(d) \quad \mbox{ iff } \quad g(n) = \sum_{d \mid n} \mu\left(\frac{n}{d}\right) f(d).$

Proof: We know that

(1)Hence our hypothesis is that $f = P_0 * g$. But then we can convolve with $\mu$ on both sides to get

(2)If we substitute the definition for the convolution on the left hand side of this expression, it tells us that

(3)Going the other way, suppose that we are told

(4)This can be reexpressed as the convolution identity $g = \mu*f$. Now convolving on both sides by $P_0$ gives

(5)By substituting in the definition of convolution on the left hand side, this tells us that

(6)as desired. $\square$

#### Example: Inverting Phi

We know from a long time ago that

(7)The left hand side is the function $P_1(n)$ (since $n = n^1 = P_1(n)$), and the right hand side is $P_0 * \phi$. MIF therefore tells us that $\phi = \mu*P_1$, which means we have

(8)To see this in action, let's test it out for $n=12$:

(9)It works!

#### Example: Inverting Sigma_{k}

We know that $\sigma_k$ is defined as $\sum_{d \mid n}d^k$. But notice this means that

(10)MIF therefore tells us that $\mu*\sigma_k = \mu*P_0*P_k = I*P_k = P_k$, so we have

(11)To see this in action, let's take $n=6$. We get:

(12)Awesome!

#### Bonus Example: Inverting to Find Mu Squared

For an integer *n*, we'll let $\omega(n)$ denote the number of distinct prime factors of *n*. With this notation, we claim that

(Here the function $\mu^2(d)$ means $\mu(d)\cdot\mu(d)$).

In class we proved this by showing that the function $F(n) = \sum_{d\mid n}\mu^2(d)$ is multiplicative, then computing $F(p^e)$ as per usual. As promised, I'll give a slightly different proof here in the notes.

Notice that $\mu^2$ takes on only the values 0 and 1; if *d* has $\mu(d) = \pm 1$, then we get $\mu^2(d) = (\pm 1)^2$, and if *d* has $\mu(d) = 0$, then we get $\mu^2(d) = (0)^2 = 0$. Hence those divisors *d* which have $\mu(d) = 0$ make no contribution to the sum considered above, whereas those divisors *d* for which $\mu(d) = \pm 1$ each contribute 1 to the sum above. To prove that identity above, then, we need to prove that there are $2^{\omega(n)}$ divisors *d* of *n* so that $\mu(d) = \pm 1$.

For this, let's write $n = p_1^{e_1}\cdots p_{\omega(n)}^{e_{\omega(n)}}$ for the prime factorization of *n* (note that we have $\omega(n)$ primes in this factorization, since $\omega(n)$ counts the number of distinct prime divisors of *n*). This means that any divisors *d* of *n* has

where the $\square$'s above $p_i$ denotes the number of times $p_i$ appears in the factorization of *d*.

Now if the exponent for $p_i$ in the factorization of *d* is 2 or larger, then this means $p_i^2 \mid d$, and so we'd have $\mu^2(d) = 0$. On the other hand, if all the exponents are 0 or 1, then this means that $\mu^2(d) = 1$. Hence to count the divisors *d* for which $\mu^2(d) = 1$, we just need to count the number of ways to fill in the $\square$'s above with either 0 or 1. Since each $\square$ can be filled with either 0 or 1, and since there are $\omega(n)$ squares total, this means that the total number of ways to fill in these boxes is $2^{\omega(n)}$. Hence there are $2^{\omega(n)}$ divisors *d* of *n* so that $\mu(d) = \pm 1$, and so we get

as promised.

Now that we know this equality is true, note that we can rewrite this equality as

(16)MIF then tells us that $\mu*2^{\omega} = \mu*P_0*\mu^2 = I* \mu^2 = \mu^2$. Hence we get the interesting identity

(17)Awesome! $\square$

# Quadratic Residues

Now that we've finished chapter 3, we're now going to change course slightly. Our starting point is to generalize the study of linear congruences from chapter 2. You will remember that in chapter 2 we were able to solve equations that took the form

(18)for arbitrary integers *a,b* and *m*. Having solved this problem, it is natural to ask whether we can solve quadratic congruence equations:

Now we know from the Chinese Remainder Theorem that solving a congruence equation of this form will rely on solving equations of the form

(20)where here *p* is a prime number. It turns out, though, that — except in the case $p=2$ — this problem can in turn be solved by solving the seemingly easier congruence

The key to this reduction is called Hensel's Lemma, but we're not going to go into how Hensel's Lemma works or why $p=2$ creates problems for applying Hensel. For now, we'll just take this on faith. You'll also have to take on faith (for now, at least), that being able to solve this last congruence is tantamount to solving a congruence of the form

(22)where here y is a variable that depends on *x,a,b* and *c* from the equation above, and *d* is a constant which depends on *a,b* and *c*.

The moral of the story is this: if you want to solve general quadratic congruences, you need to first be able to solve the "simpler" problem of determining which residues modulo *p* are actually squares. This leads to our motivating

Definition: Let

pbe an odd prime. Thennis a quadratic residue modulopif $p \nmid n$ and$x^2 \equiv n \mod{p}$

has at least one solution. Numbers

nwith $p \nmid n$ but for which the above equation has no solutions are called quadratic nonresidues.

#### Example: Is it a quadratic residue?

Suppose that someone asks you whether 2 is a quadratic residue modulo 7. To answer this question, let's see what the square of every residue is modulo 7; if 2 shows up on this list, then we'll know it's a quadratic residue, and if it doesn't show up on the list, then we'll know it's not a quadratic residue (i.e., a quadratic nonresidue).

x mod 7 | x^{2} mod 7 |
---|---|

0 | 0 |

1 | 1 |

2 | 4 |

3 | 2 |

4 | 2 |

5 | 4 |

6 | 1 |

Since 2 shows up as the square of 3 (and 4) mod 7, this means that 2 is a quadratic residue mod 7. $\square$