Lecture 5: Primes in Arithmetic Progression; Modular Congruence


In today's class we'll wrap up our discussion on the Fundamental Theorem of Arithmetic, eventually hitting Dirichlet's Theorem on primes in an arithmetic progression. Afterwards we'll introduce the notion of modular congruence, the basic notion which drives modular arithmetic.

A Fundamental Finale

Last class period we said that every integer can be uniquely factored into a product of prime numbers. Just to give you an indication that this property is not quite as inevitable as you might think, we started class by noting that there are "integer-like" collections out there which do not have this unique factorization property. For instance, the set of numbers

\begin{align} \mathbb{Z}~[\root\of{-5}] = \{a+b~\root\of{-5} : a,b \in \mathbb{Z}\} \end{align}

doesn't have this unique factorization property, since one can show that

\begin{align} 6 = 2 \cdot 3 = (1+\root\of{-5})(1-\root\of{-5}), \end{align}

where each of 2, 3, and $1 \pm \root\of{-5}$ are "irreducible" (think prime). So while we're used to using the fundamental theorem as if it could be no other way, just remember that there are collection of numbers which look an awful lot like the integers, but which don't have this nice property.

GCD and the FTA

Though it doesn't provide a method for factorizing integers, the existence of such a factorization can often be a boon for proving theoretical results. For instance, one can compute greatest common divisors and least common multiples using the Fundamental Theorem, and can more easily prove the relationship that GCDs and LCMs enjoy.

Lemma: Suppose that $n = p_1^{a_1}\cdots p_k^{a_k}$ and $m = p_1^{b_1}\cdots p_k^{b_k}$ (where we allow for some of the exponents to be 1). Then we have $(a,b) = p_1^{\min\{a_1,b_1\}} \cdots p_k^{\min\{a_k,b_k\}}$ and $[a,b] = p_1^{\max\{a_1,b_1\}} \cdots p_k^{\max\{a_k,b_k\}}$.

Once this relationship is established, it provides an easy proof for the following

Corollary: For any integers m and n, $(m,n)[m,n] = mn$.

Proof: This result just boils down to the observation that $\min\{x,y\} + \max\{x,y\} = x+y$ for any numbers x and y.$\square$

Primes in Arithmetic Progression

We finish this chapter by proving a cousin of our old result on the infinitude of primes

Theorem: There exist infinitely many primes p for which there exists $n \in \mathbb{Z}$ with $p = 4n+3$.

In order to do this, we first note the following

Lemma: The product of two integers of the form $4n+1$ and $4m+1$ is another integer of the form $4k+1$.

Proof: It isn't hard to see that

\begin{equation} (4n+1)(4m+1) = 16nm + 4n + 4m + 1 = 4(4nm + n + m) + 1. \end{equation}

Taking $k = 4nm + n + m$ gives the desired result.$\square$.

Now we're ready to prove our theorem above

Proof of Theorem: Suppose, to the contrary, that there are only finitely many such primes. We'll list these primes out in order: $p_0 = 3, p_1 = 7, \cdots$, with the largest such prime denoted $p_k$. We claim that the integer $N = 4p_1\cdots p_k + 3$ contains a prime divisor not on our list.

To see this, note first that N is an odd number, so its prime factorization contains only odd primes. If all these primes were of the form $4k+1$, then so too would N be of this form (using induction on our previous lemma). Hence there exists at least one prime divisor p of N for which $p = 4n+3$ for some integer n.

We claim that p is not included in our list of primes. Suppose first that $p = 3$. By our result on divisibility of integral linear combinations, this implies that $3 \mid N - 3 = 4p_1\cdots p_k$. Hence Euclid's Lemma implies that either $3 \mid 4$ (which it doesn't) or $3 \mid p_i$ for some i (also impossible). Hence we're led to a contradiction, and so we must have $p \neq 3$.

Since we have a complete list of primes which have remainder 3 after division by 4, this means that $p = p_i$ for some $1 \leq i \leq k$. But then we have $p_i \mid N - 4p_1 \cdots p_k = 3$ — another clear contradiction. We're left to conclude that $p \neq p_i$ for any of the $p_i$ in our supposed complete list of primes of the form $4k+3$, and hence our list must have been incomplete. $\square$.

Though an awfully nice result, we can't adapt this technique to show that there are infinitely many primes of the form $4k+1$ — we would need a result that says the product of two primes which took the form $4n+3$ again takes that form, but this is NOT true. Hence we have to be more clever if we want to prove such a result. Indeed, studying problems such as these makes us wonder how many primes there are of the form $5n+1$ or $6n + 5$ — or plenty of other possible prime types. Though the proof goes beyond the means we have in this class, there is a big result which tells us about primes of that form

Dirichlet's Theorem on Primes in an Arithmetic Progression: For any integers a and b with $(a,b) = 1$, the sequence
contains infinitely many prime numbers.

The proof of this result uses complex analysis to show that

\begin{align} \mathop{\sum_{p \mbox{ is prime}}}_{b \mid p-a} \frac{1}{p} \end{align}

diverges. Crazy!


The topics we've covered so far — basic ideas which are born from the concept of divisibility — cover most of the basic tools used in number theory as of a few hundred years ago. Our next concept — the notion of modular congruence — was developed by Gauss and was a key result for moving forward in number theory. The basic idea centers around the following

Definition: Two integers a and b are said to be congruence (or equivalent) module an integer m — written $a \equiv b \mod{m}$ — if $m \mid a-b$.

Example: Some Congruences

In class we said that $19 \equiv 2 \mod {17}$, that $51 \equiv 0 \mod {17}$, and that $10 \equiv -10 \mod{20}$. We also noticed that the first equivalence includes quite a few more integers than just 19 and 2:

\begin{align} 19 \equiv 2 \equiv -15 \equiv 36 \equiv 172 \equiv \cdots \mod{17} \end{align}


One of the benefits of modular congruence is that it behaves an awful lot like the regular "equals" you're used to playing with. In fact, modular congruence is an equivalence relation, which means it has the following properties

  1. Reflexive: for any integer a and any modulus m, we have $a \equiv a \mod{m}$.
  2. Symmetric: for any integers a and b and any modulus m, if $a \equiv b \mod{m}$ then $b \equiv a \mod{m}$.
  3. Transitive: for any integers a,b and c, and any modulus m, if $a \equiv b \mod{m}$ and $b \equiv c \mod{m}$, then $a \equiv c \mod{m}$.

Proof: To prove the reflexive property, note that $a \equiv a \mod{m}$ just means that we want to verify $m \mid a - a=0$. We saw a while back, though, that any integer m divides 0, so this statement is valid.

To prove symmetry, we need to show that $a \equiv b \mod{m}$ implies $b \equiv a \mod{m}$. If $a \equiv b \mod{m}$, though, the definition of modular congruence tells us that $m \mid a-b$, so that $mk = a-b$. But then we have $m(-k) = -(a-b) = b-a$, and so $m \mid b-a$. By the definition of modular congruence, we therefore have $b \equiv a \mod{m}$.

Finally, for transitivity we are supposed to assume that $a \equiv b \mod{m}$ and $b \equiv c \mod{m}$, and somehow conclude that $a \equiv c \mod{m}$. To prove this result, we note that the first two congruence conditions tells us that $m \mid a-b$ and $m \mid b-c$. Our result on divisibility of integral linear combinations, then, tells us that $m \mid (a-b)+(b-c) = a-c$. Hence the definition of modular congruence tells us that $a \equiv c \mod{m}$.$\square$

The benefit of showing that modular congruence is an equivalence relation is that this tells us that congruence class partition the integers into distinct sets. For instance, when the modulus is 3, we know that every integer fits into one of the three collections

\begin{align} \begin{split} & \{x \in \mathbb{Z} : x \equiv 0 \mod{3}\} = \{x \in \mathbb{Z} : 3 \mid x-0\} = \{x \in \mathbb{Z}: x = 3k\} = \{\cdots,-6,-3,0,3,6,\cdots\}\\ & \{x \in \mathbb{Z} : x \equiv 1 \mod{3}\} = \{x \in \mathbb{Z} : 3 \mid x-1\} = \{x \in \mathbb{Z}: x = 3k+1\} = \{\cdots,-5,-2,1,4,7,\cdots\}\\ & \{x \in \mathbb{Z} : x \equiv 2 \mod{3}\} = \{x \in \mathbb{Z} : 3 \mid x-2\} = \{x \in \mathbb{Z}: x = 3k+2\} = \{\cdots,-4,-1,2,5,8,\cdots\} \end{split} \end{align}

Coming up with a collection of integers which represent all these possible classes, then, is an important task. This leads to the following

Definition: A collection of integers is called a complete residue system for modulus m if every integer is congruent modulo m to exactly one element from the collection.

Example: Complete residue systems for $m=3$

To see this in action, our previous calculation shows that $\{0,1,2\}$ is a complete residue system for $m=3$. But notice that so too are $\{3,4,5\}$ and $\{7,5,30\}$. In practice we'll use the first set much more frequently. $\square$

The result we've written down for $m=3$ applies much more broadly, as shown in the following

Lemma: For any integer m, the set $\{0,1,\cdots,m-1\}$ is a complete residue system modulo m.

Proof: Given any integer a, we'll show that a is equivalent to one of the elements in this set. In order to do so, note that the division algorithm let's us find $r \in \{0,1,\cdots,m-1\}$ such that

\begin{equation} a = qm + r. \end{equation}

Notice that this means that $m \mid a-r$, and so we have $a \equiv r \mod{m}$. Hence every integer is congruent to one of the elements in our set. To be a complete residue system, though, we cannot have that any integer a is equivalent to two distinct elements in our set.

To prove that this is impossible, suppose that $a \equiv r_1 \mod{m}$ and $a \equiv r_2 \mod{m}$ for two elements $r_1,r_2 \in \{0,1,\cdots,m-1\}$. By transitivity and symmetry of congruence, this means that $r_1 \equiv r_2 \mod{m}$, which translates to the divisibility criterion $m \mid r_1-r_2$. But notice that $r_1-r_2 \leq m-1$, since the maximum difference between $r_1$ and $r_2$ is achieved when $r_1$ is as large as possible (i.e., $m-1$) and $r_2$ is as small as posible (i.e., $0$). Likewise we have $-(m-1) \leq r_1 - r_2$. These two inequalities together tell us that $|r_1-r_2| < m$, but since $m \mid r_1 - r_2$ this is only possible if $r_1-r_2 = 0$. In other words, we must have that $r_1 = r_2$. This tells us that no integer is congruent to more than one integer on our list. $\square$

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