7-euler-lecture
7-euler-lecture
Lecture 7
Justin Stevens
1 Primes
Fermat’s Little Theorem Challenge Problems
Pseudoprimes
Prime Number Theorem
Wilson’s Theorem
Proof.
Since n is a base-2 pseudoprime, 2n−1 ≡ 1 (mod n), so 2n ≡ 2 (mod n).
Therefore, there exists an integer k with 2n − 2 = kn. Substituting, we have
2Mn −1 − 1 = 2kn − 1
= (2n − 1) 2n(k−1) + 2n(k−2) + · · · + 2n + 1
≡ 0 (mod Mn ).
The previous example establishes the intuition for the below theorem.
48 = 1 · 48 = 2 · 24 = 3 · 16 = 4 · 16 = 6 · 8.
√
The divisors flip around and repeat, so we only check 2 ≤ d ≤ b nc.
Theorem. (Eratosthenes)
√ Write the numbers 1 to N in a grid. For all
primes p ≤ N, cross out the multiples 2p, 3p, 4p, · · · from. The numbers
that remain are the primes less than N.
For small n, this gives a very compact way to compute π(n). However, for
larger values of n, computing the sum above isn’t reasonable.
While studying prime tables in 1791, Gauss came up with another estimate:
Z x
dt
π(x ) ≈ = Li(x ).
2 ln(t)
In his proof, de la Vallée Poussin proved that Gauss’ Li function is always a
better estimate than n/ ln(n). He also showed that the best estimate of the
form n/(ln(n) − a) is when a = 1. Consider the following table:
2, 3, 5, 7, 13, 23, 43, 83, 163, 317, 631, 1259, 2503, 4001, · · ·
Tchebycheff proved the result in 1852 using methods similar to the prime
number theorem. In fact, the number of primes in the range is asymptotic
to n/ ln n. “Proofs from the book" features an elementary method.
An unsolved problem is Legendre’s conjecture that states there is always
a prime between n2 and (n + 1)2 . This conjecture would imply that for any
√
prime p, the gap between the next prime is in the order of p.
1 Primes
b a
S= x0 + · k, y0 − · k k ∈ Z .
d d
3x ≡ 5 (mod 7).
Listing numbers that are 5 mod 7, 5, 12, 19, we see x ≡ 4 (mod 7):
t1 ≡ t2 (mod d),
which is a contradiction. Therefore, the solutions are mutually incongruent.
Justin Stevens Euler’s Theorem (Lecture 7) 23 / 42
Every Solution
Assume that the moduli mk are pairwise relatively prime. The system will
have no solution unless each individual congruence has a solution, therefore
dk | bk for each k, where dk = gcd(ak , mk ).
If this is the case, then dk can be cancelled in the kth congruence to
produce the system with the same solution:
Observe that nk = mk /dk and the moduli nk are pairwise relatively prime.
Furthermore, gcd(ai0 , ni ) = 1, so the congruences have solutions
x = c1 N1 x1 + c2 N2 x2 + · · · + cr Nr xr .
x 0 ≡ ck ≡ x (mod nk ).
1 Primes
Fermat’s Last Theorem was not finally proved until Andrew Wiles did so in
1993 (and later revised his proof in 1994): link to the proof.
Fermat also failed to prove his little theorem, therefore, a Swiss
mathematician by the name of Leonhard Euler published a proof in 1736.
Euler continued to present other proofs of the theorem, and eventually
generalized the problem in 1763 in his paper titled “Euler’s theorem".
Justin Stevens Euler’s Theorem (Lecture 7) 31 / 42
Euler’s Totient Function
Mod 8
0 1 2 3 4 5 6 7
0 24 9 18 3 12 21 6 15
Mod 3
1 16 1 10 19 4 13 22 7
2 8 17 2 11 20 5 14 23
For coprime m and n, we define the sets Smn and S(m,n) by:
φ(mn) = φ(m)φ(n).
1
φ(piei ) = piei − piei −1 =p ei
1− .
p
Substituting for each prime pi , we arrive at the formula
k k k
1 1
ei ei −1 ei
Y Y Y
φ(n) = pi − pi = pi 1 − =n 1− .
i=1 i=1
pi i=1
pi
1 1
For example, φ(24) = 24 1 − 2 1− 3 = 8.
Solution. Since φ(49) = 42, 642 ≡ 1 (mod 49) and 842 ≡ 1 (mod 49):
We can compute 6−1 ≡ −8 (mod 49) and 8−1 ≡ −6 (mod 49), therefore
2001
Example. (Canada) Find the last 3 digits of 20032002 .
Solution. We find the value mod 8 and find the value mod 125 then use
the Chinese Remainder Theorem. First note that φ(8) = 4, therefore,
2001
20032002 ≡ 1 (mod 8)
We find this value mod 4 and mod 25. Since φ(25) = 20, we see
(
22001 ≡ 0 (mod 4)
=⇒ 22001 ≡ 52 (mod 100).
22001 ≡ 2 (mod 25)
2001
Example. (Canada) Find the last 3 digits of 20032002 .
We therefore have
2001 2001
20032002 ≡ 32002 ≡ 352 (mod 125).