This is based on a course by Michael Rubinstein (Winter 2006). All
errors are the responsibility of the author.
Bernoulli Polynomials
The following three rules uniquely specify a sequence,
,
of polynomials.
1.
,
2.
for
(i.e.
),
and
3.
for
.
Proposition 1.1. For
Proof. By induction on
.
When
,
we have
.
Suppose now that the result holds for some
so that
.
Now,
as claimed. ◻
Note that
We use Big-Oh notation to simplify by approximating upper bounds
(this is less precise than asymptotic). We say that
is asymptotically equivalent to
as
if
(denoted by
).
Big-Oh notation is used as
and we say
if there exists
such that
for some constant
and for all
.
Also
is
as
if
for some
fore all
.
Applications of Euler-Maclaurin approximation
Proposition 1.2 (Stirling’s formula for
).
Proof. We have that
which, by first order E-M approximation is
so that
Hence, in the limit,
and the exponential of this is
.
That is
or that
.
The constant
here is called Euler’s constant and is discussed next. ◻
Euler’s constant
Consider the sum
which diverges as
,
but how quickly? Writing
so not to integrate near zero. Then
Examining the bracketed
terms one finds that
is constant by comparison with
and, furthermore, that
.
Hence then, the above evaluates as
where
is Euler’s constant.
Exercise 1.3. Prove that
for
and
for
.
is continuous and even at
.
,
plugging in
,
let
with
.
Now
so
For example, if
this is
and if
we have
Divisibility and primes
For integers
,
then
is said to be divide
if
for some
.
This is also written as
.
Note that
and
but
does not divide
.
Some properties of divisibility are as follows; for
If
and
then
(this is transitivity)
If
and
then
for all
If
and
then
if
and
then
An integer
is said to be prime if its only positive divisors are 1 and
.
Otherwise,
is said to be composite.
Lemma 2.1. Any integer
is either prime, or a product of primes.
Proof. By induction on
,
this is true for
which is prime. Now assuming the result holds for all integers up to
and consider
.
If
is prime, we are done. Otherwise
is not prime so there exists a positive divisor say
.
Now
for some
and we have that both
.
Now, by induction hypothesis,
and
are either prime or can be expressed as a product of primes. Thus,
can be expressed as a product of primes. ◻
Theorem 2.2. There are infinitely many
primes.
Proof. Let
be a list of primes
.
Consider
.
If 2 divides
then
which is not true. So
Likewise,
do not divide
.
Our lemma implies that either
is prime or can be written as a product of primes, so there must be
another prime in our list and this can always be done so there are
infinitely many primes. ◻
Unique factorization
Lemma 2.3. Let
be
.
Assume that
is uniquely expressible as a product of primes. If
with
prime, then
must appear in the factorization of
.
Proof. Let
so that
for some
.
is either prime, or expressible as a product of primes say
with each
prime. So now
is a unique factorization of
into primes which includes
. ◻
Corollary 2.4. If
is uniquely expressible as a product of primes with
and
(),
then
must appear in the factorization of
.
Theorem 2.5 (Unique factorization of integers).
Every
()
is uniquely expressible as a product of primes.
Proof. By induction; this hold for
which is prime. Now assuming the result holds for all numbers up to
and consider the
case. Assume that
has two distinct factorizations say
where all the
are prime and none of the primes on the left occur on the right (if so
we could cancel). Without loss of generality
and
.
We can assume
is composite since if it were prime, it would already be uniquely
factorized. So both
and
.
Also assume without loss of generality that
so
.
Now,
and hence
.
by induction hypothesis
is uniquely factorable and
so
.
Also then
so our corollary (along with divisibility properties) implies that
meaning that
for some
.
Let
(be a product of primes) and now
allowing us to cancel
and have two distinct factorizations of
(contradicting the induction hypothesis). ◻
Application of unique factorization
Let
denote the number of divisors of
(positive). If
then
Now let
denote the sum of the positive divisors of
.
Then
(1)
A map
is said to be multiplicative if
whenever
.
Note that both
and
are multiplicative.
Indeed, let
be such that
.
Then
Observe that this does not hold when
(e.g.
).
A perfect number
is a positive integer whose proper divisors sum to itself (i.e.
).
The first two perfect numbers are 6 and 28.
Theorem 2.6.
Euclid proved that if
with
and
is prime, then
is perfect.
Euler proved that if
is even and perfect then it is of the form
with
prime.
Proof.
Let
with
an odd prime of the form
.
Then
Let
be even and perfect (so that
with
odd and
).
Consider now,
since
is perfect.
is odd so by unique factorization theorem,
which implies
.
Thus
for some
so
and hence
.
Simplifying the previous equation says
and we know
which suggests that
has two divisors. Hence
is prime and
.
Hence
(prime) and this verifies our claim.
◻
Primes of the form
are called Mersenne primes however not all numbers of this form
are prime. In fact, it remains an unsolved problem to verify whether or
not there are infinitely many Mersenne primes (there probably are).
Furthermore, none knows if there are any odd perfect numbers (probably
not).
Theorem 2.7 (Division/Euclidean algorithm). Let
with
,
then there exist unique integers
with
such that
.
Proof. Let
and
.
Observe first that
is non empty because
whenever
so infinitely many
work. Now,
is comprised of non-negative integers and any non-empty set of
non-negative integers has a minimal element (this is by the
well-ordering principal which is equivalent to the axiom of choice). Let
be the minimal element in
and
the corresponding
.
By these means, we have that
with
.
We seek to show that
,
so assume for the moment that
.
If this were the case, then
and is in
so
and is smaller than
(contradicting minimality of
).
We have non shown existence of
and
but remain to verify the uniqueness. For this, suppose that
with both
.
Equivalently, then
which implies
and hence
.
However,
so
which implies
and
hence, uniqueness. ◻
Let
,
an integer
is called a common divisor of
and
if both
and
.
Define the
to be the greatest common divisor of
and
Euclidean Algorithm
This algorithm is used to find the greatest common divisor of two
integers and is essentially a repeated division algorithm until the
remainder is zero. We claim that remainders are strictly decreasing,
non-negative and hence must reach 0. Furthermore, the
is preserved on every line.
Indeed, let
so that
hence
so that
is a common divisor of both
and
.
To see that it is furthermore the greatest common divisor of
and
,
let
be any other common divisor and show
.
We have
and
so
,
hence
is a common divisor of
and
so is
.
Lemma 2.8. If
then there exist
such that
(and any multiple of
).
This follows from back substitution of the Euclidean algorithm
Example 2.9. Let
.
Then
so
and applying this algorithm backwards, we get
Theorem 2.10. Let
and assume that
but
.
Then
Proof.
implies that there exist
such that
.
Multiplying this by
gives
.
Now
and
(by assumption) so
as required. ◻
Corollary 2.11. Let
be prime
and let
.
If
then
.
Furthermore, if
then
for some
.
Proof. If
then
and this is precisely the conditions required from the previous
theorem. ◻
With these results, one may provide an inductive proof of the unique
factorization theorem as follows; Suppose
has two distinct factorizations
.
We have
so then
for some
.
This implies
so they may be canceled. Repeating this indefinitely one finds that all
of the prime factors of
coincide and we are done.
One may apply unique factorization to give Euler’s proof that there
are infinitely many primes. Let
and consider
By unique factorization, every
appears exactly once and his series is absolutely convergent since
so rearranging sums is valid. Hence,
Now, Euler substitutes the value
so that the left hand side diverges (as the Harmonic series), so the
right hand side must have infinitely many factors (in order to
diverge).
How many primes are there? Let
denote the number of primes
.
For example,
.
Gauss conjectured that at
,
the average gap size between primes is approximately
.
That is to say the density of primes near
is
,
so Gauss conjectured that
so that
.
This was proven in 1896.
Riemann Hypothesis
To demonstrate an example, we have
and
.
Congruences
Let
with
.
we say that
is congruent to
modulo
(i.e.
)
if
.
Note that
if and only if they both have the same remainder when divided by
.
Indeed, let
and
with
.
If
then
and if
then also
so
for some integer
,
but the constraint that
implies
so
.
Note that the only possible remainders modulo
are
and these integers form a complete set of residues (i.e. any integer is
congruent to exactly one of these (modulo
).
Lemma 2.12. Congruence is an equivalence relation
(i.e. 1.
2. if
then
and 3. if
and
then
).
Proof. We only prove 3. If
and
then
and
so
as required. ◻
Lemma 2.13. Let
and
then
and
.
Proof. This is trivial from definition (i.e.
tautological). ◻
The addition rule for congruence classes holds and includes
subtraction. What about division? We check if
then
and if
then
so
.
However, if
then we may not have division.
For example,
but
.
Application of arithmetic in congruence classes
How can one tell if an integer is divisible by 9? Write
with each
.
Now, since
then
.
Hence,
Inverses modulo
Let
,
.
An element
is said to have an inverse modulo
if there exists
such that
.
If such a
exists, it is denoted by
.
Lemma 2.14.
is invertible modulo
if and only if
.
Proof. If
is invertible
then there exists
such that
so that
meaning
for some
.
Let
so
and
hence
.
Thus
.
Conversely, if
so there exists
such that
(by Euclidean algorithm) so
which means
and thus
. ◻
Example 2.15. Find
.
Applying the Euclidean algorithm;
Now, back substitution
gives
so
Another further application of this allows us to solve linear
congruences modulo
.
For example, solve
.
Multiplying by
gives
.
Note that
is called a linear congruence.
alternative proof for inverses;. Let
.
and consider the set of integers
.
These are all distinct modulo
so one of them must be congruent to
modulo
.
Indeed, for two to be equal (mod
)
then
so that
,
but
so
which means
.
However,
which implies
. ◻
Example 2.16. Let
and
so that
.
Consider the set
which is
and we find that
.
Theorem 2.17 (Fermat’s little theorem). Let
be prime and
such that
does not divide
.
Then
.
Also
even if
does divide
.
Proof. Consider the set
which are all distinct modulo
.
Also, none are congruent to zero. This is because
implies
since
does not divide
and
which implies
does not divide
so
can’t divide
.
So
.
This implies that
,
but
so
as required. ◻
Euler’s generalization of FLT
Let
denote the number of integers
such that
.
Example 2.18.
and
having coprime
for 12 and
for 15.
An integer
with
has
if and only if
.
This says that the remainder specifies whether a number has a common
factor with
or not. Let
be distinct integers satisfying that
with
.
Let
and consider the collection
.
These are all distinct modulo
and furthermore
so the product
which means (again) that
,
but the
so in fact
.
Hence,
.
Theorem 2.19 (Euler’s generalization of FLT). Let
with
and
.
Then
where
.
Example 2.20. If
and
then
Some formulas for the Euler-phi function are given as
follows
Proposition 2.21.
If
is prime, then
.
If
is prime and
then
.
Let
be distinct primes, then
.
Let
be coprime integers, then
.
proof (of 4.). First by illustration when
write all of the numbers from 0 to
in a block as
and notice that 6 divides the first row, 2 divides the third, 3 divides
the fourth and 2 divides the fifth. So only the second and sixth rows
are any good. This means, if
then 20 are immediately pulled out as having
.
Looking at the remaining two rows modulo
.
Row 2 becomes
and of these five
work. The sixth row becomes
and again
work. We now have
rows each providing
valid
.
To generalize the above illustration, write
Recall that if
with
then
.
Our goal is to pick out the
’s
in
such that
which holds if and only if both
and
.
This says, that we may restrict ourselves to
rows beginning with
such that
.
Next take a given row
.
Modulo
,
this row forms a complete set of residues. So of these, exactly
are coprime with
.
All together this is
◻
Making use of all of the above properties, then with
Proposition 2.22.
Proof. Making use of Equation (1),
◻
Chinese remainder theorem
Theorem 2.23 (Chinese remainder theorem). Let
both
and
.
Given
we can find an integer
such that
and
.
Furthermore, the solution is unique if we restrict
to be
.
In other words, two simultaneous congruences
and
are equivalent to a single congruence modulo
.
This theorem allows us to simplify the above prove that
implies
.
Indeed, Let
and
with
and
.
Now
if and only if both
and
of which there are
and
possibilities respectively. By the Chinese Remainder Theorem (CRT), each
pair
provides a unique
satisfying the conditions
and
.
Thus there are all together
pairs so demonstrating our claimed result.
Theorem 2.24 (Wilson’s Theorem). Let
be prime, then
.
Proof. Matching up inverse pairs
are all invertible modulo
since non share common factors with
.
Most of them are not equal to their own inverse.
Hence then, by matching inverse pairs,
◻
Polynomial Congruences
Theorem 3.1 (Lagrange’s Theorem). Let
be prime,
non negative and
with
.
Then the polynomial equation
has at most
solutions modulo
.
Proof. By induction on
;
This holds for
since
has no solutions. Furthermore, this is true when
since
has one solution
.
For the inductive step, the slick way is to use long division to pull
out a linear factor for each root. Either
has a root or not. If not, then zero roots is less than
as claimed. If there is a root, say
,
then the difference between our original equation from the and the same
one with
substituted for
is
which factors as
where
has integer coefficients and
.
Now,
which implies
or
(since
is prime). Hence, by induction hypothesis there are at most one plus
solutions modulo
. ◻
Example 3.2.
has 3 solutions
.
has 1 solution modulo 3 and that is
.
A counter example in the case that
is not prime;
has
4
solutions. These are
.
Primitive roots and Quadratic residues
Let
be positive and
such that
.
The order of
modulo
is the smallest possible integer
such that
.
Theorem 3.3 (Euler’s Theorem). If
then
which implies that the order of
is
.
Example 3.4.
and
.
3 Observe that
and these exponents are all divisors of
.
Proof. Let
and suppose
is the order of
.
We have
,
but
for all
.
We wish to show that
.
Let
with
and show that
.
By Euler’s Theorem,
meaning that
.
Thus, as already noted, we must have
so that
as required. ◻
Furthermore, if
is known to have order
modulo
(and
)
then
if and only if
divides
.
This holds for the same reason as the previous result.
Lemma 3.5. Let
be a positive integer. If
has order
,
then
has order
.
Proof. Order of
is the smallest integer
such that
,
hence if and only if
.
Let
so that
and
with
.
Now
implies
or, equivalently,
meaning
and so
.
But
is an integer so we must have that
which means
.
Thus, the smallest positive
has
which implies
as claimed. ◻
An integer
is said to be a primitive root modulo
if
its order equals
.
Not all moduli have primitive roots (e.g.
since
and
).
We claim that
has a primitive root if and only if
or
where
is any odd prime and
.
We shall demonstrate only that primes have primitive roots. For example,
when
,
the primitive roots are 2, 6, 7 and 8.
We have see that if
has order
modulo
,
then
.
Let
and notice that
which counts the number of
’s
according to their order.
We claim that
1. If
then
,
and
2. claim 1 implies
.
To show the second, assume that
so that
Now, for the first claim, either
or not, if
then
.
If
then there is at least one
with
with order
and
for all
.
Now consider the equation
.
is a solution to this equation and so are
since
.
Since
has order
,
all of these
’s
are distinct modulo
so we have found all solutions to this degree
equation (Lagrange’s Theorem). Our goal then is to determine
(i.e. how many elements have order
).
Check how many of
have order
.
If
has order
,
then
has order
implying that
of the
’s
satisfy
.
Thus, if
then
.
In particular, the number of primitive roots modulo
is precisely
.
Let
be a primitive root modulo
;
then
are congruent to
mod
only they re in some strange order.
Note that the primitive roots modulo 11 are 2,6,7,8 and there are
of them. So
equal to
respectively.
power residues
An integer
is said to be a
power residue modulo
if there exists some integer
such that
.
Otherwise,
is a
power non-residue mod
.
Note that we do not consider
.
Example 3.6. The quadratic residues modulo 11 are
found from the following table;
Hence
are quadratic residues.
In terms of our primitive root,
,
all quadratic residues are of the form
with
.
Let
be a primitive root modulo
and rewrite
in terms of
as follows;
and
for some
.
The congruence then becomes
which is equivalent to
which can be solved if and only if
divides
.
Note that
has solutions if and only if
.
Indeed, let
and if
then the original equation is equivalent to
.
A solution to this equation (modulo
)
gives rise to
solutions modulo
of the original equation. We have then solutions above if and only if
.
If so, then there are
solutions modulo
to our equation.
if and only if
.
which implies
for
so
of the
’s
are quadratic residues.
Let
be a prime and
a primitive root modulo
.
You can write any
as
>
for some
.
This
is called the index of
relative to the primitive root
(mod
).
is uniquely specified if we restrict it to
as powers of
(mod
)
repeat every
(since
has order
).
Now,
which is equivalent to
which implies
.
Indeed,
implies
.
Conversely, if
with
(where
is not important. then
.
If
htne
so that
because the powers of
do not repeat with the constraint
.
Example 3.7.
is a primitive root mod 7.
The primitive roots mod 11 are
powers of 2 are
The
’s
which are quadratic residues modulo 11 are 1,3,4,5,9. If you didn’t know
about primitive roots then you could square all of the integers mod
11.
If
then
.
So quadratic residues, if any always occur in pairs
and
.
Example 3.8. Cubic residue modulo 11.
in terms of primitive root
.
Let
and
then
means that
.
Here
so we want
.
and
for all
.
Hence all such
are cubic residues mod 11.
Check;
Lets now take a look at
power residues mod 11. Again, we seek to solve
.
so we must have
meaning that
or 10. Examining powers of
,
which are
and our theory suggests that only
and
can be solved while all other
can not be solved.
Checking this,
Quadratic residues
Let
be an odd prime. How many of
are quadratic residues? We have seen that
which implies there are
quadratic residues. We also saw that these quadratic residues come in
pairs.
.
For
,
all quadratic residues appear once as an
with
.
Proposition 3.9.
The product of 2 quadratic residues mod
is a quadratic residue,
The product of two quadratic non-residues
is a quadratic residue, and
The product of a quadratic non-residue with a quadratic
residue is a quadratic non-residue
.
Proof. Write everything in terms of a primitive root, Let
so that
and this result becomes equivalent to parity of the sum of two
integers. ◻
Definition 3.10 (Legendre Symbol). Let
be prime and
.
Define the Legendre Symbol as
Example 3.11. Let
,
then
If we write
where
is a primitive root mod
,
then
is a quadratic residue if and only if
is even. So (for
)
we have
The above proposition then boils down to say, when
,
and this identity extends even when one of
or
is 0 mod
.
Question: When is -1 a quadratic residue modulo
?
That is to ask, for which
does
have solutions?
Answer: Assuming
is odd then there are solutions if an only if
for some
.
This proof makes use of Euler’s criterion which we must first
discuss.
Lemma 3.12 (Euler’s criterion).
Before this is proven, we remark that the beauty of this formula is
that it does not require primitive roots, however it is practically
limited.
Proof. First observe that
is even (since
is odd). Now, if
then
(Fermat’s Little Theorem). That is,
(this only hold because p-1 is even). Hence we must have that
so to say
.
Now, either
is a quadratic residue, or it is not. If it is, then
for some even
,
say
so that
.
Hence, in this case
.
Otherwise, then
with
odd, say
.
So,
(from above). However
since
has order
.
Therefore,
. ◻
Note that if
then
.
Question: Suppose
is fixed and we vary
.
How does the Legendre symbol depend on
?
Partial answer:
is determined according to
().
We will see that
Also,
For example,
and
.
The first formula here is a simple extension of Euler’s formula;
A method to the madness of quadratic residues,
Lemma 3.13 (Gauss’ Lemma). Let
.
Consider
with
an odd prime. Reduce them all modulo
so the lie in the interval
.
Some will be big (i.e.
)
and some will be small (i.e.
).
For the big ones, subtract another multiple of
,
so that
with each
for all
.
For example, if
and
we consider
.
Let
represent the number of negative
’s
resulting from this procedure (so in our example
).
Then, Gauss’ Lemma states that
Observe that the
’s
are just the numbers
,
but with each having a signature. So
which is equivalent to
Now Euler’s formula is
so,
Let
with
for each
.
We claim that
are the numbers
in some weird order. If the claim is true then
Now, since
for each
,
we may cancel the
’s
on either side, so this is equivalent to
That is
.
So it remains to prove that
for
.
By construction we have
which implies also that
and since
because
.
We now have two cases;
1.
means that
so
and hence
and finally then
.
2.
implies
,
but
so
.
Applications of Gauss’ Lemma
Suppose
,
then
is
.
Notice that they already fall in our interval
so there is no need to further reduce. They are also all negative so
.
Hence,
As a second application, suppose
and
is an odd prime. Then
.
All of these lie in the interval
so roughly 1/2 of them are too big. Let us be more specific,
We must now count the even number
for which
.
That is how many integers
satisfy
?
This depends on
modulo 8. Suppose
where
or
.
Now
.
We are really only concerned with the parity of
which is equivalent to the number of integers
satisfying
;
When
there are no integers in the interval
so
is even.
When
there is one integer in the interval
so
is odd.
When
there is one integer in the interval
.
When
there are two integers in
.
Therefore,
Quadratic reciprocity
Theorem 3.14 (Quadratic Reciprocity). Let
be distinct odd primes, then
Euler conjectured while Gauss proved at the age of nineteen that if
is a positive integer and
is an odd prime with
,
then the value of
is determined by the value of
modulo
.
Namely, if
then
.
Furthermore, by symmetry, if
then
.
Proof. Consider
and reduce by subtracting multiples of
so they all lie in the interval
.
Each of the
lie in some interval
and we only need a finite number of these intervals because
when
is even covers them all and
does when
is odd. We are not omitting any
by taking open intervals since none of them are multiples of
or
.
Let
with each
.
The negative
’s
come from multiples which lie in intervals of the form
and Gauss’ Lemma implies that
.
So how many
satisfy that
is equivalent to asking how many integers lie between
,
but
implies
with
and the intervals become
Since we are only interested in the parity of the number of integers
between, we may reduce the problem to the intervals
.
Now the only dependence of whether
is even or odd is on
and
.
Hence
if
. ◻
Now we are in position to prove Quadratic reciprocity;
Proof. If
are distinct odd primes, then
Verifying this, if
then
so
for some integer
.
Now,
and
So Euler’s conjecture implies that
when
so our result holds when
.
Now, if
then
(i.e.
and
or vice versa). So
meaning that
and so
.
Thus,
and we are done. ◻
With this, we can compute several Legendre symbols;
Example 3.15.
Continued fractions
A real number
may be expresses as
where
and
.
Next write
where
.
Repeating this process on
provides a way of writing
as a fraction (possibly continuing forever).
Example 4.1.
and
Let
with
.
Euclidean algorithm gives
,
.
So,
We have shown how to obtain the continued fraction when
is rational and recognized that the continued fraction for a rational
number terminates after finitely many steps. Furthermore, the converse
of this is true because continued fractions which terminate can be put
over a common denominator.
Finite continued fractions
Consider a fraction of the form
Are there any patterns?
This gives a recursion for
the numerator and denominator of a continued fraction. Let
denote the numerator of the fraction so the denominator will be given by
.
The recursion for the numerator is thus,
Note that continued fraction for
terminates if and only if
is rational.
Example 4.2.
so now we may write
Euler’s Rule for continued fractions is that
is given as the sum of products of
’s
where pairs of adjacent
’s
are omitted.
Observe
and
.
This is simply proven by induction since we have the recursive
formula
Corollary 4.3.
so that the fractions
and
have the same numerator.
For example,
and
have the same numerator!
An application of the result is that we may now turn a backwards
recursion into a forewords recursion. That is,
hence if
then
for
.
Also the denominator is given by
for
.
We may also set
so this recursion holds for all
.
The advantage now is that extending a continued fraction by one extra
partial quotient no longer requires redoing the entire thing from the
bottom!
Let
.
The
partial quotient
()
for
is given by
Example 4.4. Find the continued fraction for
and find all of its partial quotients (i.e. it’s convergence).
First, the Euclidean algorithm gives
so
Now, the sort way to find the partial quotients is via the following
table;
Lemma 4.5.
That is, they alternate in sign.
Proof. By induction, when
we have
which is good. Assuming now that the result holds for
and considering the
case
(),
then
◻
Corollary 4.6.
is in reduced form. That is
.
Proof. Let
and we have
.
Since
and
then
implying
. ◻
Infinite continued fractions
Let
(i.e.
is irrational). The procedure
with
and
can be repeated on
and yields a continued fraction for
.
After
repetitions of this, one will have
and never terminates. That is to say
since
is irrational. Note that for rationals
.
So in this case we write
where
and so we could also write
Question: How well do convergents
approximate
?
Equivalently, how small is
?
Theorem 4.7.
for all
.
Furthermore, this implies
as
because
is a monotonically increasing sequence of integers
(
).
Proof. Consider the difference
where the inequality holds
because
and this yields the desired result. ◻
Another important observation to make is that the sequence given by
is monotonically decreasing. Continued fractions provide best
approximations of irrational numbers in the sense that if
is the
convergent to
,
then any other
which is closer to
must have
(i.e. larger denominator).
An application of this answers the question “Why are there 12 notes
to an octave?” There are 3 constraints here.
1. Desire to modulate (i.e. transpose ratio between successive is
constant, say
),
2. Must capture an octave,
3. Want to capture a perfect
.
This means we want
for some
.
This implies
which can’t be done because this is
so
and violates prime factorization. We should thus find ratios
such that
.
Examine
whose solution is
and is irrational. Finding rational numbers close to
using continued fractions (since they give the best approximations). We
find that
and convergents are
which suggests a 12 note octave with a perfect fifth approximated. So
and approximates a perfect fifth within 2% of a semitone.
Theorem 4.8. Continued fractions give best
approximation to real numbers. That is, if
and
is the
convergent then
implies
.
Proof. Even convergence are increasing and odd convergence
are decreasing (because of the
found in the differences). Suppose that
is even and that
were closer to
.
Then
.
Now,
since
is even. This implies (expanding the left hand side) that
Hence, then
which implies
as claimed. ◻
Periodic continued fractions
Let us begin with an example,
This yields the quadratic equation for
given by
and so implies
,
but
so we take
.
Also, we may write
which implies
.
Notice, in general that
and is purely periodic when
for some
.
In the case of pure periodicity, then
satisfies a quadratic equation with integer coefficients. For example,
from above
implying that
.
Theorem 4.9.
periodic implies that
eventually.
Definition 4.10.
is called a quadratic irrational if it is an irrational root of
a quadratic equation with integer coefficients (i.e.
for
)
If
is a root of
then its conjugate, denoted by
is the other root.
A quadratic irrational is called reduced if
and its conjugate satisfies
.
Theorem 4.11.
has a purely periodic continued fraction if and only if
is reduced.
Proof. Suppose first that
has a purely periodic continued fraction so that
which give a quadratic irrational (we know it irrational since the
continued fraction doesn’t terminate). Consider
obtained by reversing the period of
.
That is,
So,
satisfy
which are equivalent to
and
multiplying the second equation by
then becomes
meaning that
and
are conjugates (i.e. distinct roots of the same quadratic equation).
Now,
implies
so
is reduced.
Conversely, suppose
is reduced so that it is a quadratic irrational with
and
.
More precisely this means
for some
so that
.
So
is square free and positive,
and
while
.
Lemma 4.12.
reduced implies
(i) Both
,
(ii)
,
and
(iii)
.
proof: For (ii), observe
and
.
For (i)
by assumption and
means
which means
so
since
.
Finally, for (iii)
so
which implies
since
because
meaning
.
As second lemma states;
Lemma 4.13. Consider the continued fraction from
the algorithm
where
is the integer part of
.
If
is reduced then so is
.
Furthermore,
takes the form
for the same
as
and
.
proof: Let
so that
.
Declare that
so to say
.
Simplifying this gives
since
so
and
.
Apparently this is the end of the proof. ◻
An application of this is to provide a continued fraction for
.
Claim:
where
is purely periodic.
Proof. 1.
is a quadratic irrational since
which implies
so that
.
2.
3.
since
which implies
and
so that
. ◻
Pell’s equations
These come up when trying to find units in real quadratic fields. Let
be a positive integer which is not a square. Pell’s equation is
and we wish to find positive integer solutions
to the equation
.
This implies
where the inequality holds since
so
.
So a pair of integer solutions to
give an approximation to
.
Namely
which beats the typical convergent to
by quite a bit. We learned that continued fractions give best
approximations to reals. This suggests looking at the continued fraction
for
,
but only certain types of convergence will give this tight of an
approximation.
Consider
(the two convergence that appear before the
term)
This implies
and comparing coefficients gives
and
meaning
and
.
Now,
so
and hence
So when
is odd, this is a solution to Pell’s equations. If
is even, we go up by
convergence to
and the proof is the same. In general we get
and
if and only if
is odd or
is even.
Partitions
How many ways can we add up to an integer from a given set? Some
classical problems involving this are sums of positive integers, sums of
squares, cubes, etc. and the Goldbach conjecture about sums of
primes.
An easy problem; how many ways are there to add to
using positive integers where the order is taken into consideration?
Place
dots on the page in a row, there are
ways to insert a barrier or not between each of these dots. This is
equivalent to partitioning
into a sum of positive integers where order counts. Hence
,
the number of ways to write
as a sum of positive integers, is
.
If order doesn’t count, then
.
The following result relates partitions to pentagonal numbers.
Theorem 5.1 (Euler’s Pentagonal Number Theorem).
where
are called pentagonal numbers.
Hardy and Littlewood show using
with
.
Ramanujan wrote, with
and
and
when
are coprime. Now,
is the first example of an integer weight modular form.
Let
be the number of ways of writing
as a sum of
-squares
(allowing negatives and zeros). One finds that
where
is the number of divisors of
congruent to
modulo 4. Note that
if
does not have a prime of the form
raised to an odd power in its prime factorization.
Furthermore,
which implies all positive integers
can be expressed as the sum of four squares.
Theorem 5.2 (Euler). Let
be prime. Then
can be written as the sum of squares.
Proof. With
the the congruence can be solved by
for some
.
Now,
implies
for some
with
.
If
can be written as the sum of two squares with
then there exists an
with
such that
.
Repeat this process until
.
To demonstrate that this is true, reduce
modulo
chosen to lie in the interval
.
That is
with both
.
Now
where
for some
.
Since
and the left hand side is positive, this furthermore means that
because otherwise
,
so
but this implies
(a contradiction).
Thus,
with
.
Now,
so
.
by Fibonacci. Thus, a product of squares is a sum of two squares.
and
meaning that
and
so that
. ◻