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.
A Review of Convolutions
In class on Wednesday we defined the convolution of 2 arithmetic functions f and g as the arithmetic function
defined by

Example: Convolution in practice
Just to get a little exercise with convolutions, let's try to compute
:


After we defined convolutions, we talked about a few important identities, like
(The functions
and
were all defined last class period). It was this last identity which led to the Mobious Inversion Formula.
Mobius Inversion
Last class period we finished by stating the following
Theorem (MIF): If f and g are arithmetic functions, then
Proof: We know that
(3)
Hence our hypothesis is that
. But then we can convolve with
on both sides to get

If we substitute the definition for the convolution on the left hand side of this expression, it tells us that
(5)
Going the other way, suppose that we are told
(6)
This can be reexpressed as the convolution identity
. Now convolving on both sides by
gives

By substituting in the definition of convolution on the left hand side, this tells us that
(8)
as desired. 
Example: Inverting Phi
We know from a long time ago that
(9)
The left hand side is the function
(since
), and the right hand side is
. MIF therefore tells us that
, which means we have

To see this in action, let's test it out for
:

It works!
Example: Inverting Sigmak
We know that
is defined as
. But notice this means that

MIF therefore tells us that
, so we have

To see this in action, let's take
. We get:

Awesome!
Bonus Example: Inverting to Find Mu Squared
For an integer n, we'll let
denote the number of distinct prime factors of n. With this notation, we claim that

(Here the function
means
). To see this is true, notice that
takes on only the values 0 and 1; if d has
, then we get
, and if d has
, then we get
. Hence those divisors d which have
make no contribution to the sum considered above, whereas those divisors d for which
each contribute 1 to the sum above. To prove that identity above, then, we need to prove that there are
divisors d of n so that
.
For this, let's write
for the prime factorization of n (note that we have
primes in this factorization, since
counts the number of distinct prime divisors of n). This means that any divisors d of n has

where the
's above
denotes the number of times
appears in the factorization of d.
Now if the exponent for
in the factorization of d is 2 or larger, then this means
, and so we'd have
. On the other hand, if all the exponents are 0 or 1, then this means that
. Hence to count the divisors d for which
, we just need to count the number of ways to fill in the
's above with either 0 or 1. Since each
can be filled with either 0 or 1, and since there are
squares total, this means that the total number of ways to fill in these boxes is
. Hence there are
divisors d of n so that
, and so we get

as promised.
Now that we know this equality is true, note that we can rewrite this equality as
(18)
MIF then tells us that
. Hence we get the interesting identity

Awesome! 
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
(20)
for arbitrary integers a,b and m. Having solved this problem, it is natural to ask whether we can solve quadratic congruence equations:
(21)
Now we know from the Chinese Remainder Theorem that solving a congruence equation of this form will rely on solving equations of the form
(22)
where here p is a prime number. It turns out, though, that — except in the case
— 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
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

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 p be an odd prime. Then n is a quadratic residue modulo p if
and
has at least one solution. Numbers n withbut 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 | x2 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. 
To finish off our introduction to quadratic residues, let's count the number of solutions to equations of the form
(25)
when
.
Lemma: If
, then the equation
has either 0 solutions or 2 solutions.
Proof: First, if n is a quadratic nonresidue, then by definition
has no solutions.
Now if n is a quadratic residue, then by definition this means
does have at least one solution. Let's choose one solution
. Notice that we then also have

so that
is also a solution. Furthermore, we know that
, since otherwise we'd have
, implying either
(impossible since p is odd) or
(impossible since this would mean
, which is ruled out since
by hypothesis). So this means that
are distinct solutions to the equation.
Are there any more? If
were some solution to
, then this would mean that

This in turn implies that
, and then Euclid's Lemma says that
or
. In the former case we'd have
, whereas in the latter we'd have
. Hence we see that any solution is equivalent to one of the two we have already produced, and so there aren't any new solutions. This makes the total number of solutions in this case equal to 2. 








