# Dirichlet’s Theorem for arithmetic progressions with difference 4

From antiquity, Euclid’s Theorem asserts that the number of primes is infinite. Since all primes except are odd, a re-phrasement of Euclid’s theorem is that the set of odd integers contains an infinite number of primes. A natural generalization, proved by Dirichlet, is that every arithmetic progression of the form contains an infinite number of primes, provided that and are relatively prime.

(Dirichlet’s Theorem) If , then the arithmetic progression contains infinitely many primes, where denotes the greatest common divisor of and .

The proof is one of the first application of Fourier analysis on finite abelian groups. Here in this post, we prove Dirichlet’s theorem when , i.e., both the arithmetic progressions and contain an infinite number of primes. The restriction to highlights the main structure of Dirichlet’s proof without needing as much background from number theory.

Before jumping directly into the proof, let us first discuss some number-theoretic background and the high-level strategy. First recall Euclid’s argument. For the sake of contradiction, there are exactly primes of the . Then the number is larger than every and cannot be a prime of the form . On the other hand, from the Fundamental Theorem of Arithmetic, is the product of primes, and one of them must be congruent to since itself is. So some must divide both and and , implying that divides , a contradiction. One can easily verify that this argument can be adapted to by taking . However, the argument breaks down when applied to the arithmetic progression . The reason is that the number is no longer guaranteed to have a prime divisor of the form .

Instead, Euler’s analytic proof of Euclid’s Theorem provides the proper framework to extend the infinitude of primes to arithmetic progressions, where the zeta function can be written as the product of geometric series of primes:

(Euler-Dirichlet Product Formula) For every ,

Furthermore, if is multiplicative, i.e., , then

(A note on notation: always denotes a prime, and and range over all primes.) The identity can be viewed as an analytic version of the Fundamental Theorem of Arithmetic: every positive integer is the product of some prime powers, and the expression is a geometric series. Since diverges, The Product Formula also implies that the number of primes is infinite. With additional calculation, Euler proved the stronger form of Euclid’s Theorem:

Now to prove Dirichlet’s Theorem, we will show that the sum as , where is the indicator function on for being congruent to . By Fourier analysis, can be decomposed into two sums. Roughly, the first corresponds to the zeroth Fourier coefficient of and evaluates to , which diverges as , and the second sum corresponds to the non-zero Fourier coefficients and is always bounded. In our writeup, the advantage of restricting to is that the estimate of the second sum becomes significantly simpler, without further tools from number theory.

(Proof of Dirichlet’s Theorem restricted to .) Let be the multiplicative group of integers modulo , and be the indicator function such that if and otherwise. Then by Fourier expansion,
for every ,

where ranges over all characters of the dual group of . Since is a finite abelian group, it is is also isomorphic to its dual, and with , we can conclude that the only characters of are: the trivial character that is identically , and the character where if
and if . Thus, we can simplify and rewrite as

(For sanity check, one can easily verify via direct computation, without Fourier analysis, that the identities and hold.) For the rest of this proof, we will rely on the the fact that the characters and are real-valued.

To prove the theorem, we have to sum over all integers instead of just the multiplicative subgroup of . To this end, for every character , we define its Dirichlet character to be the extension to all of as follows: if and otherwise. Let be the indicator function of being congruent to . Then it is easy to see that

where are the Dirichlet characters of , respectively. Since we can express the indicator function in terms of Dirichlet characters, we have

It suffices to prove that as . In particular, we will show that

• as , which coincides with Euler’s argument since for all , and
• .

To estimate these sums, we prove the following:

Let be a Dirichlet character for . Then , where .
(of Proposition) Since is multiplicative, from the Euler-Dirichlet Product Formula,

Since is real-valued, taking log of both sides, we have

where the second line follows from the estimate of the power series when , and the third from the fact that converges.

Now we estimate the two sums using the above proposition. For the trivial Dirichlet character , we have

which diverges as since diverges as .

For the non-trivial character , is simply the alternating series , which converges to a positive number. Thus,

completing the proof.

Most steps in the preceding proof can be easily extended to an arbitrary . The Euler-Dirichlet Product Formula works for a multiplicative function taking values in . The Fourier expansion of works as before. The Proposition still holds, but extra care has to be taken since the -function is now complex-valued. The sum diverges, but for a non-trivial Dirichlet character , the fact that the sum is bounded is significantly more involved. See for instance Apostol or Stein-Shakarchi for further details.

We finish by observing that the proof above has a quantitative form.

(Quantitative version of Dirichlet’s Theorem) For every ,

In general, for an arbitrary , the expression is replaced by , with , where is the Euler totient function.
Proof proceeds the same as before, where we showed that

with and . Previously, we simply noted that diverges as . To finish the proof, it suffices to note that

# Exponential sum and the equidistribution theorem

Consider the sequence , where gives the fractional part of a real number. The equidistribution theorem states that is irrational iff for any sub-interval of the unit interval, for sufficiently large , roughly of the numbers fall inside . More precisely,

(Equidistributed sequence) A sequence with is equidistributed mod 1 if for every ,

(Equidistribution theorem) The sequence is equidistributed mod 1 iff is irrational.

Let us try to understand why the sequence behaves differently depending on whether is rational or not. If for some integers and , then roughly of the first multiples of are integers, i.e., . In fact, it is not difficult to see that for , fraction of the sequence equals . So equidistribution does not occur when is rational.

Now for , consider the exponential function , which has period . As discussed above, roughly of the sequence is , so the exponential sum contains an infinite number of ones. For example if , the exponential sum evaluates to , which is Grandi’s series and diverges. For an arbitrary , the exponential sum is a repeating sum of all -th roots of unity, and one can use the same technique showing that Grandi’s series diverges to establish that this exponential sum diverges too. However, the case when is irrational differs: every nonzero integer multiple of is an non-integer, and thus for any . Writing , the exponential sum converges to the geometric series , since .

In fact, the above intuition can be summarized into the following criterion due to Weyl:

(Weyl’s criterion) A sequence is equidistributed mod 1 iff for all integers ,

From the above discussion, Weyl’s criterion immediately implies the equidistribution theorem.

(of equidistribution theorem) Suppose is rational, i.e., for some integers and . Without loss of generality, we assume . Then for all integer , by Euclid’s algorithm, is in . So the sequence is not equidistributed, e.g., no multiples of fall inside .

Now suppose is irrational. Since , we have

which tends to as .

Before proving Weyl’s criterion, it is instructive to state the notion of equidistribution analytically. For , let iff . Note that is a periodic function on all of .

(Weyl’s criterion restated) Let be a sequence in . The following two statements are equivalent:
1) For ,

2) For all integers ,

Written in this form, Weyl’s criterion is asserting that if the sum of every interval function at a sequence converges to its integral, then every exponential sum converges to its integral as well, and vice versa. The reason is that both the space of interval functions and the space of exponential functions can approximate one another. More precisely, an exponential function is clearly periodic and continuous (and thus uniformly continuous), and every uniformly continuous function can be approximated by a finite sum of interval functions. For the other direction, a periodic, interval function can be approximated by a periodic, continuous function, which by Fejér’s Theorem can also be approximated by a finite sum of exponential functions. Now we have all the machinery to write down a proof.

(of Weyl’s criterion) For the forward direction (1) => (2), fix and . Since the exponential function continuous on the closed interval , it is also uniformly continuous, i.e., there exists some such that for every , . Let be a step function where if . By construction, is a finite sum of interval functions with .

By linearity, we have

By taking sufficiently large and repeatedly applying triangle inequality, we have

implying that converges to as .

Now we consider the reverse direction (2) => (1). Fix and let . Define

Note that is continuous, periodic, and dominates . By Fejér’s Theorem, there exists such that . By linearity, we have

By taking sufficiently large and repeatedly applying triangle inequality, we have

implying that

Since dominates , we have

One can similarly define a periodic, continuous function that approximates from below, showing that is bounded below by , which together with the proceeding argument will show that the limit of must exist and converge to .

# Summability, Tauberian theorems, and Fourier series

Consider a periodic function . Its Fourier series always exists formally, but questions of whether its Fourier series converges to itself can be rather subtle. In general, may be different from its Fourier series: a Fourier coefficient is the evaluation of an integral, so can be changed pointwise without affecting the value of any Fourier coefficient. It may be natural to believe that convergence holds when is continuous. However, an example constructed by du Bois-Reymond showed that continuity is not sufficient. The most general result in this area is Carleson’s theorem, showing that -functions have convergent Fourier series almost everywhere.

Here we will prove that the Fourier series of converges to in the sense of Cesàro (or Abel), and we will highlight through a Tauberian-type theorem that convergence holds when is “smooth”. In particular, the main theorem we will show is that for a periodic, continuous function, its Fourier series converges pointwise if its Fourier coefficients are decaying at a linear rate.

If and and is continuous at , then as .
The sufficient condition in the above theorem can be improved to , but we won’t prove the stronger statement here.

What types of functions are characterized by decaying Fourier coefficients?
A simple calculation with integration by parts shows that if is differentiable, then . Since by the Riemann-Lesbesgue lemma, we have the following:

If is differentiable, then its Fourier series converges pointwise to .

In general, convergence also holds for other types of smoothness conditions.

## Summability

We first take a detour (without the Fourier analysis setting) to investigate the different notions of summability for a sequence. The standard and familiar notion of summability captures the intuitive notion that as one adds more numbers from a sequence, the sum gets closer to its limit. More precisely,

A sequence is summable to if its sequence of partial sums where converges to .

Under this definition, the partial sums of Grandi’s series oscillate between and , and thus the series diverges. However, one could argue that this series “hovers” around since the partial sums oscillate between and . In fact, the average partial sums of the sequence converge to . This motivates the following alternate definition of summability:

A sequence is Cesàro-summable to if its sequence of Cesàro means converges to , where and is the -th partial sum .

It is instructive to rewrite the Cesàro mean as

We can see that the Cesàro mean is a weighted average of the ‘s, where the later terms contribute with a discount linear factor. With this insight, it is intuitive to conclude if a sequence is summable, then it is also Cesàro-summable: a summable sequence must have vanishing “tail”, implying that its Cesàro means form a Cauchy sequence and thus converge.

We can consider another definition of summability where the discount factor is exponential:

A sequence is Abel summable to if for every , converges and .

Intuitively, Abel summability ought to capture a larger class of sequences. In fact, one can summarize this entire section in the following:

If a sequence is summable to , then it is Cesàro-summable to . If a sequence is Cesàro-summable to , then it is also Abel-summable to .
Suppose first that is summable to . For every , there exists such that for every , . Let and . Then for every , we have

and when is sufficiently large, ,
implying that as .

Now suppose that converges to . Define . Then we can write

Since , using a similar calculation as above, we can write

Since converges (and is thus bounded), converges for every and so does .

Now it remains to show that . Let , then there exists such that for each , . We can split into two sums:

Since one can exchange limit with finite sums, is . So

A similar shows that , and hence is Abel summable to .

## A Tauberian-type theorem

In the previous section, we showed that the class of summable sequences is a subset of Cesàro-summable sequeences, which in turn is a subset of Abel-summable sequences. It is not difficult to see that these containments are strict. However, by imposing certain conditions, these containments can also be reversed, and statements of this type are called “Tauberian-type theorems”. Here we prove a simple version where the magnitude of the sequence decays linearly.

(Tauberian) Suppose the sequence satisfies .
(a) If is Cesàro-summable to , then is also summable to .
(b) If is Abel-summable to , then is also summable to .
(a) Fix . Let be the Cesàro mean and partial sum of , respectively. By assumption, when is sufficiently large, and by triangle inequality, is at most , so it suffices to prove that .

Recall that in the previous section, we proved that

Then we have

By assumption, there is some such that for every , , implying . Then when is sufficiently large, , proving that as desired.

(b) Let . Define . By assumption, when is sufficiently large, , and by triangle inequality, is at most , so it suffices to prove that . By triangle inequality again, we have

By assumption, there is some such that for every , . Again we can break the the above sum into two, and for the later terms, we have

For the initial terms, we have

where the last inequality is due to Bernoulli’s inequality, and is bounded above by when is sufficiently large. Together we have as desired.

## Fourier series

We now come back to the Fourier setting. First recall that

For a periodic function , we define its -th partial Fourier sum to be , with , and .

We now introduce Dirichlet and Fejér kernels, which when convolved with a function , we obtain the partial sum and Cesàro mean of , letting us invoke Tauberian Theorem.

is the -th Dirichlet kernel, and is the -th Fejér kernel.
(Tauberian theorem restated) Let be a periodic function with . Then for any , if for some as , then as .
For any nonnegative integer , let . Note that by assumption . By the Convolution Theorem, the -th partial sum of is simply

and similarly, the -th Cesàro mean of is

where the second line follows from the linearity of convolution. Thus, by Tauberian theorem, if converges, then converges to the same value as well.

To prove the main theorem, it now suffices to show that approaches . We make one last definition:

Let be a periodic function. We say that is a family of good kernels if the following three conditions all hold:
(a) for each , ,
(b) for each , , and
(c) for any , as .

The idea is that a family of good kernels essentially approximate the Dirac delta function, which is a single point with infinite mass at and vanishes everywhere else.

The Fejér kernels is a family of good kernels.

We will skip the proof of this fact as it is a straightforward calculation once one establishes the trignometric identity . (However, the Dirichlet kernels cannot be a family of good kernels, otherwise every Fourier series converges to its function, which is not true.) Intuitively, since is a weighted average of with highest weights around (by the definition of a good family of kernels), we can expect that this value is close to , as long as the does not change its value too much around . Now we formalize and prove this intuition, which will finish the proof of our main theorem.

Suppose is a family of good kernels. Let be a periodic, integrable function that is continuous at . Then as .
We first write

where the first through third lines follow from the definition of convolution, Condition (a) of a good family of kernels, and triangle inequality.

The idea is that when integrating over , is small if is bounded away from , and is small if is close to . Formally, let . Since is continuous at , there is some such that

for some by Condition (b) of a good family of kernels. Since can be arbitrary, the above integral is .

Now for the other values of , note that since is integrable, the function is bounded by some . Then

which tends to as , finishing the proof.

In the previous section, we showed that the Abel mean can play a similar role to Cesàro. Similarly, one can define the Poisson kernel and show that it is a good family of kernels as to prove the main theorem through instead.

# The Basel problem via Fourier series

The Basel problem asks to compute the summation of the reciprocal of the natural numbers squared, and it is known that

While there are numerous known proofs (our presentation resembles Proof 9 most closely), we give a self-contained one that motivates the usage of Fourier analysis for periodic functions.

Recall that a function is -periodic if for every , . From Fourier analysis, every such function can be expressed as a series of cosines and sines. More precisely,

If is continuous and -periodic, then

where , and is the -th Fourier coefficient equal to .

We say that is the Fourier series of . When we define the inner product of two functions to be , then it is easily seen that the “characters” form an orthonormal system, and the -th Fourier coefficient can be viewed as the projection of along the -th character. The Fourier theorem asserts that can be approximated in -norm by its Fourier series. In fact, by applying the Weierstrass M-test, we can make the following statement with a stronger convergence guarantee:

If is continuous and -periodic and is convergent, then its Fourier series converges uniformly to .

Furthermore, the Fourier transform itself encodes many of the properties of the original function . In particular, we note that the symmetry of is preserved in its Fourier transform.

If is even, then for every , .
If is odd, then for every , .

Now we have the machinery to compute .

(Of Basel) Define to be . We compute the Fourier coefficient of . First note that

For , we have

Using integration by parts, we have for every ,

Then

Thus,

From Euler’s formula, the Fourier series of can be written as

Since is even, by Proposition, . From our calculation, the Fourier series of is explicitly

Note that is convergent from the Cauchy condensation test. Thus, by the Convergence Theorem, we conclude that

where the convergence is uniform (and in particular, pointwise). Setting , we see that

Lastly, observe that

finishing the proof.