Tag Archives: primes

A Short Note on Gaps Between Powers of Consecutive Primes

Introduction

The primary purpose of this note is to collect a few hitherto unnoticed or unpublished results concerning gaps between powers of consecutive primes. The study of gaps between primes has attracted many mathematicians and led to many deep realizations in number theory. The literature is full of conjectures, both open and closed, concerning the nature of primes.

In a series of stunning developments, Zhang, Maynard, and Tao12 made the first major progress towards proving the prime $k$-tuple conjecture, and successfully proved the existence of infinitely many pairs of primes differing by a fixed number. As of now, the best known result is due to the massive collaborative Polymath8 project,3 which showed that there are infinitely many pairs of primes of the form $p, p+246$. In the excellent expository article, 4 Granville describes the history and ideas leading to this breakthrough, and also discusses some of the potential impact of the results. This note should be thought of as a few more results following from the ideas of Zhang, Maynard, Tao, and the Polymath8 project.

Throughout, $p_n$ will refer to the $n$th prime number. In a paper, 5 Andrica conjectured that
\begin{equation}\label{eq:Andrica_conj}
\sqrt{p_{n+1}} – \sqrt{p_n} < 1
\end{equation}
holds for all $n$. This conjecture, and related statements, is described in Guy’s Unsolved Problems in Number Theory.
6 It is quickly checked that this holds for primes up to $4.26 \cdot 10^{8}$ in sagemath

# Sage version 8.0.rc1
# started with `sage -ipython`

# sage has pari/GP, which can generate primes super quickly
from sage.all import primes_first_n

# import izip since we'll be zipping a huge list, and sage uses python2 which has
# non-iterable zip by default
from itertools import izip

# The magic number 23150000 appears because pari/GP can't compute
# primes above 436273290 due to fixed precision arithmetic
ps = primes_first_n(23150000)    # This is every prime up to 436006979

# Verify Andrica's Conjecture for all prime pairs = up to 436006979
gap = 0
for a,b in izip(ps[:-1], ps[1:]):
    if b**.5 - a**.5 > gap:
        A, B, gap = a, b, b**.5 - a**.5
        print(gap)
print("")
print(A)
print(B)

In approximately 20 seconds on my machine (so it would not be harder to go much higher, except that I would have to go beyond pari/GP to generate primes), this completes and prints out the following output.

0.317837245196
0.504017169931
0.670873479291

7
11

 

Thus the largest value of $\sqrt{p_{n+1}} – \sqrt{p_n}$ was merely $0.670\ldots$, and occurred on the gap between $7$ and $11$.

So it appears very likely that the conjecture is true. However it is also likely that new, novel ideas are necessary before the conjecture is decided.

Andrica’s Conjecture can also be stated in terms of prime gaps. Let $g_n = p_{n+1} – p_n$ be the gap between the $n$th prime and the $(n+1)$st prime. Then Andrica’s Conjecture is equivalent to the claim that $g_n < 2 \sqrt{p_n} + 1$. In this direction, the best known result is due to Baker, Harman, and Pintz, 7 who show that $g_n \ll p_n^{0.525}$.

In 1985, Sandor 8 proved that \begin{equation}\label{eq:Sandor} \liminf_{n \to \infty} \sqrt[4]{p_n} (\sqrt{p_{n+1}} – \sqrt{p_n}) = 0. \end{equation} The close relation to Andrica’s Conjecture \eqref{eq:Andrica_conj} is clear. The first result of this note is to strengthen this result.

Theorem

Let $\alpha, \beta \geq 0$, and $\alpha + \beta < 1$. Then
\begin{equation}\label{eq:main}
\liminf_{n \to \infty} p_n^\beta (p_{n+1}^\alpha – p_n^\alpha) = 0.
\end{equation}

We prove this theorem below. Choosing $\alpha = \frac{1}{2}, \beta = \frac{1}{4}$ verifies Sandor’s result \eqref{eq:Sandor}. But choosing $\alpha = \frac{1}{2}, \beta = \frac{1}{2} – \epsilon$ for a small $\epsilon > 0$ gives stronger results.

This theorem leads naturally to the following conjecture.

Conjecture

For any $0 \leq \alpha < 1$, there exists a constant $C(\alpha)$ such that
\begin{equation}
p_{n+1}^\alpha – p_{n}^\alpha \leq C(\alpha)
\end{equation}
for all $n$.

A simple heuristic argument, given in the last section below, shows that this Conjecture follows from Cramer’s Conjecture.

It is interesting to note that there are generalizations of Andrica’s Conjecture. One can ask what the smallest $\gamma$ is such that
\begin{equation}
p_{n+1}^{\gamma} – p_n^{\gamma} = 1
\end{equation}
has a solution. This is known as the Smarandache Conjecture, and it is believed that the smallest such $\gamma$ is approximately
\begin{equation}
\gamma \approx 0.5671481302539\ldots
\end{equation}
The digits of this constant, sometimes called “the Smarandache constant,” are the contents of sequence A038458 on the OEIS. It is possible to generalize this question as well.

Open Question

For any fixed constant $C$, what is the smallest $\alpha = \alpha(C)$ such that
\begin{equation}
p_{n+1}^\alpha – p_n^\alpha = C
\end{equation}
has solutions? In particular, how does $\alpha(C)$ behave as a function of $C$?

This question does not seem to have been approached in any sort of generality, aside from the case when $C = 1$.

Proof of Theorem

The idea of the proof is very straightforward. We estimate \eqref{eq:main} across prime pairs $p, p+246$, relying on the recent proof from Polymath8 that infinitely many such primes exist.

Fix $\alpha, \beta \geq 0$ with $\alpha + \beta < 1$. Applying the mean value theorem of calculus on the function $x \mapsto x^\alpha$ shows that
\begin{align}
p^\beta \big( (p+246)^\alpha – p^\alpha \big) &= p^\beta \cdot 246 \alpha q^{\alpha – 1} \\\
&\leq p^\beta \cdot 246 \alpha p^{\alpha – 1} = 246 \alpha p^{\alpha + \beta – 1}, \label{eq:bound}
\end{align}
for some $q \in [p, p+246]$. Passing to the inequality in the second line is done by realizing that $q^{\alpha – 1}$ is a decreasing function in $q$. As $\alpha + \beta – 1 < 0$, as $p \to \infty$ we see that\eqref{eq:bound} goes to zero.

Therefore
\begin{equation}
\liminf_{n \to \infty} p_n^\beta (p_{n+1}^\alpha – p_n^\alpha) = 0,
\end{equation}
as was to be proved.

Further Heuristics

Cramer’s Conjecture states that there exists a constant $C$ such that for all sufficiently large $n$,
\begin{equation}
p_{n+1} – p_n < C(\log n)^2.
\end{equation}
Thus for a sufficiently large prime $p$, the subsequent prime is at most $p + C (\log p)^2$. Performing a similar estimation as above shows that
\begin{equation}
(p + C (\log p)^2)^\alpha – p^\alpha \leq C (\log p)^2 \alpha p^{\alpha – 1} =
C \alpha \frac{(\log p)^2}{p^{1 – \alpha}}.
\end{equation}
As the right hand side vanishes as $p \to \infty$, we see that it is natural to expect that the main Conjecture above is true. More generally, we should expect the following, stronger conjecture.

Conjecture’

For any $\alpha, \beta \geq 0$ with $\alpha + \beta < 1$, there exists a constant $C(\alpha, \beta)$ such that
\begin{equation}
p_n^\beta (p_{n+1}^\alpha – p_n^\alpha) \leq C(\alpha, \beta).
\end{equation}

Additional Notes

I wrote this note in between waiting in never-ending queues while I sort out my internet service and other mundane activities necessary upon moving to another country. I had just read some papers on the arXiv, and I noticed a paper which referred to unknown statuses concerning Andrica’s Conjecture. So then I sat down and wrote this up.

I am somewhat interested in qualitative information concerning the Open Question in the introduction, and I may return to this subject unless someone beats me to it.

This note is (mostly, minus the code) available as a pdf and (will shortly) appears on the arXiv. This was originally written in LaTeX and converted for display on this site using a  set of tools I’ve written based around latex2jax, which is available on my github.

Posted in Math.NT, Mathematics, sage | Tagged , , , | 1 Comment

Math 420: Supplement on Gaussian Integers II

This is a secondary supplemental note on the Gaussian integers, written for my Spring 2016 Elementary Number Theory Class at Brown University. This note is also available as a pdf document.

In this note, we cover the following topics.

  1. Assumed prerequisites from other lectures.
  2. Which regular integer primes are sums of squares?
  3. How can we classify all Gaussian primes?

1. Assumed Prerequisites

Although this note comes shortly after the previous note on the Gaussian integers, we covered some material from the book in the middle. In particular, we will assume use the results from chapters 20 and 21 from the textbook.

Most importantly, for $latex {p}$ a prime and $latex {a}$ an integer not divisible by $latex {p}$, recall the Legendre symbol $latex {\left(\frac{a}{p}\right)}$, which is defined to be $latex {1}$ if $latex {a}$ is a square mod $latex {p}$ and $latex {-1}$ if $latex {a}$ is not a square mod $latex {p}$. Then we have shown Euler’s Criterion, which states that

$$ a^{\frac{p-1}{2}} \equiv \left(\frac{a}{p}\right) \pmod p, \tag{1}$$
and which gives a very efficient way of determining whether a given number $latex {a}$ is a square mod $latex {p}$.

We used Euler’s Criterion to find out exactly when $latex {-1}$ is a square mod $latex {p}$. In particular, we concluded that for each odd prime $latex {p}$, we have

$$ \left(\frac{-1}{p}\right) = \begin{cases} 1 & \text{ if } p \equiv 1 \pmod 4 \ -1 & \text{ if } p \equiv 3 \pmod 4 \end{cases}. \tag{2}$$
Finally, we assume familiarity with the notation and ideas from the previous note on the Gaussian integers.

2. Understanding When $latex {p = a^2 + b^2}$.

Throughout this section, $latex {p}$ will be a normal odd prime. The case $latex {p = 2}$ is a bit different, and we will need to handle it separately. When used, the letters $latex {a}$ and $latex {b}$ will denote normal integers, and $latex {q_1,q_2}$ will denote Gaussian integers.

We will be looking at the following four statements.

  1. $latex {p \equiv 1 \pmod 4}$
  2. $latex {\left(\frac{-1}{p}\right) = 1}$
  3. $latex {p}$ is not a Gaussian prime
  4. $latex {p = a^2 + b^2}$

Our goal will be to show that each of these statements are equivalent. In order to show this, we will show that

$$ (1) \implies (2) \implies (3) \implies (4) \implies (1). \tag{3}$$
Do you see why this means that they are all equivalent?

This naturally breaks down into four lemmas.

We have actually already shown one.

Lemma 1 $latex {(1) \implies (2)}$.

Proof: We have already proved this claim! This is exactly what we get from Euler’s Criterion applied to $latex {-1}$, as mentioned in the first section. $latex \Box$

There is one more that is somewhat straightfoward, and which does not rely on going up to the Gaussian integers.

Lemma 2 $latex {(4) \implies (1)}$.

Proof: We have an odd prime $latex {p}$ which is a sum of squares $latex {p = a^2 + b^2}$. If we look mod $latex {4}$, we are led to consider $$ p = a^2 + b^2 \pmod 4. \tag{4}$$
What are the possible values of $latex {a^2 \pmod 4}$? A quick check shows that the only possibilites are $latex {a^2 \equiv 0, 1 \pmod 4}$.

So what are the possible values of $latex {a^2 + b^2 \pmod 4}$? We must have one of $latex {p \equiv 0, 1, 2 \pmod 4}$. Clearly, we cannot have $latex {p \equiv 0 \pmod 4}$, as then $latex {4 \mid p}$. Similarly, we cannot have $latex {p \equiv 2 \pmod 4}$, as then $latex {2 \mid p}$. So we necessarily have $latex {p \equiv 1 \pmod 4}$, which is what we were trying to prove. $latex \Box$

For the remaining two pieces, we will dive into the Gaussian integers.

Lemma 3 $latex {(2) \implies (3)}$.

Proof: As $latex {\left(\frac{-1}{p}\right) = 1}$, we know there is some $latex {a}$ so that $latex {a^2 \equiv -1 \pmod p}$. Rearranging, this becomes $latex {a^2 + 1 \equiv 0 \pmod p}$.

Over the normal integers, we are at an impasse, as all this tells us is that $latex {p \mid (a^2 + 1)}$. But if we suddenly view this within the Gaussian integers, then $latex {a^2 + 1}$ factors as $latex {a^2 + 1 = (a + i)(a – i)}$.

So we have that $latex {p \mid (a+i)(a-i)}$. If $latex {p}$ were a Gaussian prime, then we would necessarily have $latex {p \mid (a+i)}$ or $latex {p \mid (a-i)}$. (Do you see why?)

But is it true that $latex {p}$ divides $latex {a + i}$ or $latex {a – i}$? For instance, does $latex {p}$ divide $latex {a + i}$? No! If so, then $latex {\frac{a}{p} + \frac{i}{p}}$ would be a Gaussian integer, which is clearly not true.

So $latex {p}$ does not divide $latex {a + i}$ or $latex {a-i}$, and we must therefore conclude that $latex {p}$ is not a Gaussian prime. $latex \Box$

Lemma 4 $latex {(3) \implies (4)}$.

Proof: We now know that $latex {p}$ is not a Gaussian prime. In particular, this means that $latex {p}$ is not irreducible, and so it has a nontrivial factorization in the Gaussian integers. (For example, $latex {5}$ is a regular prime, but it is not a Gaussian prime. It factors as $latex {5 = (1 + 2i)(1 – 2i)}$ in the Gaussian integers.)

Let’s denote this nontrivial factorization as $latex {p = q_1 q_2}$. By nontrivial, we mean that neither $latex {q_1}$ nor $latex {q_2}$ are units, i.e. $latex {N(q_1), N(q_2) > 1}$. Taking norms, we see that $latex {N(p) = N(q_1) N(q_2)}$.

We can evaluate $latex {N(p) = p^2}$, so we have that $latex {p^2 = N(q_1) N(q_2)}$. Both $latex {N(q_1)}$ and $latex {N(q_2)}$ are integers, and their product is $latex {p^2}$. Yet $latex {p^2}$ has exactly two different factorizations: $latex {p^2 = 1 \cdot p^2 = p \cdot p}$. Since $latex {N(q_1), N(q_2) > 1}$, we must have the latter.

So we see that $latex {N(q_1) = N(q_2) = p}$. As $latex {q_1, q_2}$ are Gaussian integers, we can write $latex {q_1 = a + bi}$ for some $latex {a, b}$. Then since $latex {N(q_1) = p}$, we see that $latex {N(q_1) = a^2 + b^2}$. And so $latex {p}$ is a sum of squares, ending the proof. $latex \Box$

Notice that $latex {2 = 1 + 1}$ is also a sum of squares. Then all together, we can say the following theorem.

Theorem 5 A regular prime $latex {p}$ can be written as a sum of two squares, $$ p = a^2 + b^2, \tag{5}$$
exactly when $latex {p = 2}$ or $latex {p \equiv 1 \pmod 4}$.

A remarkable aspect of this theorem is that it is entirely a statement about the behaviour of the regular integers. Yet in our proof, we used the Gaussian integers in a very fundamental way. Isn’t that strange?

You might notice that in the textbook, Dr. Silverman presents a proof that does not rely on the Gaussian integers. While interesting and clever, I find that the proof using the Gaussian integers better illustrates the deep connections between and around the structures we have been studying in this course so far. Everything connects!

Example 1 The prime $latex {5}$ is $latex {1 \pmod 4}$, and so $latex {5}$ is a sum of squares. In particular, $latex {5 = 1^2 + 2^2}$.

Example 2 The prime $latex {101}$ is $latex {1 \pmod 4}$, and so is a sum of squares. Our proof is not constructive, so a priori we do not know what squares sum to $latex {101}$. But in this case, we see that $latex {101 = 1^2 + 10^2}$.

Example 3 The prime $latex {97}$ is $latex {1 \pmod 4}$, and so it also a sum of squares. It’s less obvious what the squares are in this case. It turns out that $latex {97 = 4^2 + 9^2}$.

Example 4 The prime $latex {43}$ is $latex {3 \pmod 4}$, and so is not a sum of squares.

3. Classification of Gaussian Primes

In the previous section, we showed that each integer prime $latex {p \equiv 1 \pmod 4}$ actually splits into a product of two Gaussian numbers $latex {q_1}$ and $latex {q_2}$. In fact, since $latex {N(q_1) = p}$ is a regular prime, $latex {q_1}$ is a Gaussian irreducible and therefore a Gaussian prime (can you prove this? This is a nice midterm question.)

So in fact, $latex {p \equiv 1 \pmod 4}$ splits in to the product of two Gaussian primes $latex {q_1}$ and $latex {q_2}$.

In this way, we’ve found infinitely many Gaussian primes. Take a regular prime congruent to $latex {1 \pmod 4}$. Then we know that it splits into two Gaussian primes. Further, if we know how to write $latex {p = a^2 + b^2}$, then we know that $latex {q_1 = a + bi}$ and $latex {q_2 = a – bi}$ are those two Gaussian primes.

In general, we will find all Gaussian primes by determining their interaction with regular primes.

Suppose $latex {q}$ is a Gaussian prime. Then on the one hand, $latex {N(q) = q \overline{q}}$. On the other hand, $latex {N(q) = p_1^{a_1} p_2^{a_2} \cdots p_k^{a_k}}$ is some regular integer. Since $latex {q}$ is a Gaussian prime (and so $latex {q \mid w_1 w_2}$ means that $latex {q \mid w_1}$ or $latex {q \mid w_2}$), we know that $latex {q \mid p_j}$ for some regular integer prime $latex {p_j}$.

So one way to classify Gaussian primes is to look at every regular integer prime and see which Gaussian primes divide it. We have figured this out for all primes $latex {p \equiv 1 \pmod 4}$. We can handle $latex {2}$ by noticing that $latex {2 = (1 + i) (1-i)}$. Both $latex {(1+i)}$ and $latex {(1-i)}$ are Gaussian primes.

The only primes left are those regular primes with $latex {p \equiv 3 \pmod 4}$. We actually already covered the key idea in the previous section.

Lemma 6 If $latex {p \equiv 3 \pmod 4}$ is a regular prime, then $latex {p}$ is also a Gaussian prime.

Proof: In the previous section, we showed that if $latex {p}$ is not a Gaussian prime, then $latex {p = a^2 + b^2}$ for some integers $latex {a,b}$, and then $latex { p \equiv 1 \pmod 4}$. Since $latex {p \not \equiv 1 \pmod 4}$, we see that $latex {p}$ is a Gaussian prime. $latex \Box$

In total, we have classified all Gaussian primes.

Theorem 7 The Gaussian primes are given by

  1. $latex {(1+i), (1-i)}$
  2. Regular primes $latex {p \equiv 3 \pmod 4}$
  3. The factors $latex {q_1 q_2}$ of a regular prime $latex {p \equiv 1 \pmod 4}$. Further, these primes are given by $latex {a \pm bi}$, where $latex {p = a^2 + b^2}$.

 

4. Concluding Remarks

I hope that it’s clear that the regular integers and the Gaussian integers are deeply connected and intertwined. Number theoretic questions in one constantly lead us to investigate the other. As one dives deeper into number theory, more and different integer-like rings appear, all deeply connected.

Each time I teach the Gaussian integers, I cannot help but feel the sense that this is a hint at a deep structural understanding of what is really going on. The interplay between the Gaussian integers and the regular integers is one of my favorite aspects of elementary number theory, which is one reason why I deviated so strongly from the textbook to include it. I hope you enjoyed it too.

Posted in Brown University, Expository, Math 420, Mathematics, Teaching | Tagged , , , , , | Leave a comment

A pigeon for every hole, and then one (sort of)

There is a certain pattern to learning mathematics that I got used to in primary and secondary school. It starts like this: first, there are only positive numbers. We have 3 apples, or 2 apples, or maybe 0 apples, and that’s that. Sometime after realizing that 100 apples is a lot of apples (I’m sure that’s how my 6 year old self would have thought of it), we learn that we might have a negative number. That’s how I learned that they don’t always tell us everything, and that sometimes the things that they do tell us have silly names.

We know how the story goes – for a while, there aren’t remainders in division. Imaginary numbers don’t exist. Under no circumstance can we divide or multiply by infinity, or divide by zero. And this doesn’t go away: in my calculus courses (and the ones I’ve helped instruct), almost every function is continuous (at least mostly) and continuity is equivalent to ‘being able to draw it without lifting a pencil.’ It would be absolutely impossible to conceive of a function that’s continuous precisely at the irrationals, for instance (and let’s not talk about $latex G_\delta$ or $latex F_\sigma$). And so the pattern goes on.

So when I hit my first class where I learned and used the pigeon-hole principle regularly (which I think was my combinatorics class? Michelle – if you’re reading this, perhaps you remember), I thought the name “pigeon-hole” was another one of those names that will get tossed. And I was wrong.

I was in a seminar today, listening to someone talk about improving results related to equidistribution theorems, approximating reals by rationals, and… the Dirichlet Box Principle. And there was much talking of pigeons and their holes (albeit a bit stranger, and far more ergodic-sounding than what I first learned on).

Not knowing much ergodic theory (or any at all, really), I began to think about a related problem. A standard application of pigeonholing is to show that any real number can be approximated to arbitrary accuracy by a rational $latex \frac{p}{q}$. What if we restricted our $latex p,q$ to be prime? I.e., are prime ratios dense in (say) $latex \mathbb{R}^+$?

More after the fold –

(more…)

Posted in Expository, Math.NT, Mathematics | Tagged , , , , , , , | 2 Comments

Factoring I

I remember when I first learnt that testing for primality is in P (as noted in the paper Primes is in P, which explains the AKS algorithm). Some time later, I was talking with a close friend of mine (who has since received his bachelors in Computer Science). He had thought it was hard to believe that it was possible to determine whether a number was prime without factoring that number. That’s pretty cool. The AKS algorithm doesn’t even rely on anything really deep – it’s just a clever application of many (mostly) elementary results. Both of us were well aware of the fact that numbers are hard, as an understatement, to factor. My interest in factoring algorithms has suddenly surged again, so I’m going to look through some factoring algorithms (other than my interesting algorithm, that happens to be terribly slow).

(more…)

Posted in Expository, Math.NT, Mathematics | Tagged , , , , , | 1 Comment