Tag Archives: mathematics

A Short Note on Gaps Between Powers of Consecutive Primes


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
\sqrt{p_{n+1}} – \sqrt{p_n} < 1
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

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.




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.


Let $\alpha, \beta \geq 0$, and $\alpha + \beta < 1$. Then
\liminf_{n \to \infty} p_n^\beta (p_{n+1}^\alpha – p_n^\alpha) = 0.

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.


For any $0 \leq \alpha < 1$, there exists a constant $C(\alpha)$ such that
p_{n+1}^\alpha – p_{n}^\alpha \leq C(\alpha)
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
p_{n+1}^{\gamma} – p_n^{\gamma} = 1
has a solution. This is known as the Smarandache Conjecture, and it is believed that the smallest such $\gamma$ is approximately
\gamma \approx 0.5671481302539\ldots
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
p_{n+1}^\alpha – p_n^\alpha = C
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
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}
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.

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

Further Heuristics

Cramer’s Conjecture states that there exists a constant $C$ such that for all sufficiently large $n$,
p_{n+1} – p_n < C(\log n)^2.
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
(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}}.
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.


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

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

Computing pi with tools from Calculus

Computing $\pi$

This note was originally written in the context of my fall Math 100 class at Brown University. It is also available as a pdf note.

While investigating Taylor series, we proved that
\frac{\pi}{4} = 1 – \frac{1}{3} + \frac{1}{5} – \frac{1}{7} + \frac{1}{9} + \cdots
Let’s remind ourselves how. Begin with the geometric series
\frac{1}{1 + x^2} = 1 – x^2 + x^4 – x^6 + x^8 + \cdots = \sum_{n = 0}^\infty (-1)^n x^{2n}. \notag
(We showed that this has interval of convergence $\lvert x \rvert < 1$). Integrating this geometric series yields
\int_0^x \frac{1}{1 + t^2} dt = x – \frac{x^3}{3} + \frac{x^5}{5} – \frac{x^7}{7} + \cdots = \sum_{n = 0}^\infty (-1)^n \frac{x^{2n+1}}{2n+1}. \notag
Note that this has interval of convergence $-1 < x \leq 1$.

We also recognize this integral as
\int_0^x \frac{1}{1 + t^2} dt = \text{arctan}(x), \notag
one of the common integrals arising from trigonometric substitution. Putting these together, we find that
\text{arctan}(x) = x – \frac{x^3}{3} + \frac{x^5}{5} – \frac{x^7}{7} + \cdots = \sum_{n = 0}^\infty (-1)^n \frac{x^{2n+1}}{2n+1}. \notag
As $x = 1$ is within the interval of convergence, we can substitute $x = 1$ into the series to find the representation
\text{arctan}(1) = 1 – \frac{1}{3} + \frac{1}{5} – \frac{1}{7} + \cdots = \sum_{n = 0}^\infty (-1)^n \frac{1}{2n+1}. \notag
Since $\text{arctan}(1) = \frac{\pi}{4}$, this gives the representation for $\pi/4$ given in \eqref{eq:base}.

However, since $x=1$ was at the very edge of the interval of convergence, this series converges very, very slowly. For instance, using the first $50$ terms gives the approximation
\pi \approx 3.121594652591011. \notag
The expansion of $\pi$ is actually
\pi = 3.141592653589793238462\ldots \notag
So the first $50$ terms of \eqref{eq:base} gives two digits of accuracy. That’s not very good.

I think it is very natural to ask: can we do better? This series converges slowly — can we find one that converges more quickly?


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

Math 420: Second Week Homework

Firstly, we have three administrative notes.

  1. I’ve posted the second homework set. You can find it here.
  2. I’ve also written solutions to the first homework set. You can find those here.
  3. After feedback from the first week, I’m setting stable office hours. My office hours will be from 1-3pm on Monday and 2:30-3:30pm on Tuesday (immediately following our class). [Or we can set up an appointment].

I’ll see you on Tuesday, when we will continue to talk about the Euclidean Algorithm and greatest common divisors.


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

Estimating the number of squarefree integers up to $X$

I recently wrote an answer to a question on MSE about estimating the number of squarefree integers up to $X$. Although the result is known and not too hard, I very much like the proof and my approach. So I write it down here.

First, let’s see if we can understand why this “should” be true from an analytic perspective.

We know that
$$ \sum_{n \geq 1} \frac{\mu(n)^2}{n^s} = \frac{\zeta(s)}{\zeta(2s)},$$
and a general way of extracting information from Dirichlet series is to perform a cutoff integral transform (or a type of Mellin transform). In this case, we get that
$$ \sum_{n \leq X} \mu(n)^2 = \frac{1}{2\pi i} \int_{(2)} \frac{\zeta(s)}{\zeta(2s)} X^s \frac{ds}{s},$$
where the contour is the vertical line $\text{Re }s = 2$. By Cauchy’s theorem, we shift the line of integration left and poles contribute terms or large order. The pole of $\zeta(s)$ at $s = 1$ has residue
$$ \frac{X}{\zeta(2)},$$
so we expect this to be the leading order. Naively, since we know that there are no zeroes of $\zeta(2s)$ on the line $\text{Re } s = \frac{1}{2}$, we might expect to push our line to exactly there, leading to an error of $O(\sqrt X)$. But in fact, we know more. We know the zero-free region, which allows us to extend the line of integration ever so slightly inwards, leading to a $o(\sqrt X)$ result (or more specifically, something along the lines of $O(\sqrt X e^{-c (\log X)^\alpha})$ where $\alpha$ and $c$ come from the strength of our known zero-free region.

In this heuristic analysis, I have omitted bounding the top, bottom, and left boundaries of the rectangles of integration. But proceeding in a similar way as in the proof of the analytic prime number theorem, you could proceed here. So we expect the answer to look like
$$ \frac{X}{\zeta(2)} + O(\sqrt X e^{-c (\log X)^\alpha})$$
using no more than the zero-free region that goes into the prime number theorem.

We will now prove this result, but in an entirely elementary way (except that I will refer to a result from the prime number theorem). This is below the fold.


Posted in Expository, Math.NT, Mathematics | Tagged , , , , | Leave a comment

Notes from a talk on the Mean Value Theorem

1. Introduction

When I first learned the Mean Value Theorem and the Intermediate Value Theorem, I thought they were both intuitively obvious and utterly useless. In one of my courses in analysis, I was struck when, after proving the Mean Value Theorem, my instructor said that all of calculus was downhill from there. But it was a case of not being able to see the forest for the trees, and I missed the big picture.

I have since come to realize that almost every major (and often, minor) result of calculus is a direct and immediate consequence of the Mean Value Theorem and the Intermediate Value Theorem. In this talk, we will focus on the forest, the big picture, and see the Mean Value Theorem for what it really is: the true Fundamental Theorem of Calculus.


Posted in Expository, Mathematics | Tagged , , , , , , | 2 Comments

Three Conundrums on Infinity

In this short post, we introduce three conundrums dealing with infinity. This is inspired by my calculus class, as we explore various confusing and confounding aspects of infinity and find that it’s very confusing, sometimes mindbending.

Order Matters

Consider the alternating unit series $$ \sum_{n \geq 0} (-1)^n. $$
We want to try to understand its convergence. If we write out the first several terms, it looks like $$ 1 – 1 + 1 – 1 + 1 – 1 + \cdots $$
What if we grouped the terms while we were summing them? Perhaps we should group them like so, $$ (1 – 1) + (1 – 1) + (1 – 1) + \cdots = 0 + 0 + 0 + \cdots $$
so that the sum is very clearly $latex {0}$. Adding infinitely many zeroes certainly gives zero, right?

On the other hand, what if we group the terms like so, $$ 1 + (-1 + 1) + (-1 + 1) + \cdots = 1 + 0 + 0 + \cdots $$
which is very clearly $latex {1}$. After all, adding $latex {1}$ to infinitely many zeroes certainly gives one, right?

A related, perhaps deeper paradox is one we mentioned in class. For conditionally convergent series like the alternating harmonic series $$ \sum_{n = 1}^\infty \frac{(-1)^n}{n}, $$
if we are allowed to rearrange the terms then we can have the series sum to any number that we want. This is called the Riemann Series Theorem.

The Thief and the King

A very wealthy king keeps gold coins in his vault, but a sneaky thief knows how to get in. Suppose that each day, the king puts two more gold coins into the vault. And each day, the thief takes one gold coin out (so that the king won’t notice that the vault is empty). After infinitely many days, how much gold is left in the vault?

Suppose that the king numbers each coin. So on day 1, the king puts in coins labelled 1 and 2, and on day 2 he puts in coins labelled 3 and 4, and so on. What if the thief steals the odd numbered coin each day? Then at the end of time, the king has all the even coins.

But what if instead, the thief steals from the bottom. So he first steals coin number 1, then number 2, and so on. At the end of time, no coin is left in the vault, since for any number $latex {n}$, the $latex {n}$th coin has been taken by the king.

Prevalence of Rarity

When I drove to Providence this morning, the car in front of me had the license place 637RB2. Think about it – out of the approximately $latex {10\cdot10\cdot10\cdot26\cdot 26 \cdot 10 = 6760000}$ possibilities, I happened across this one. Isn’t that amazing! How could something so rare happen to me?

Amazingly, something just as rare happened last time I drove to Providence too!

Posted in Brown University, Mathematics, Teaching | Tagged , , | 1 Comment

Continuity of the Mean Value

1. Introduction

When I first learned the mean value theorem as a high schooler, I was thoroughly unimpressed. Part of this was because it’s just like Rolle’s Theorem, which feels obvious. But I think the greater part is because I thought it was useless. And I continued to think it was useless until I began my first proof-oriented treatment of calculus as a second year at Georgia Tech. Somehow, in the interceding years, I learned to value intuition and simple statements.

I have since completely changed my view on the mean value theorem. I now consider essentially all of one variable calculus to be the Mean Value Theorem, perhaps in various forms or disguises. In my earlier note An Intuitive Introduction to Calculus, we state and prove the Mean Value Theorem, and then show that we can prove the Fundamental Theorem of Calculus with the Mean Value Theorem and the Intermediate Value Theorem (which also felt silly to me as a high schooler, but which is not silly).

In this brief note, I want to consider one small aspect of the Mean Value Theorem: can the “mean value” be chosen continuously as a function of the endpoints? To state this more clearly, first recall the theorem:

Suppose $latex {f}$ is a differentiable real-valued function on an interval $latex {[a,b]}$. Then there exists a point $latex {c}$ between $latex {a}$ and $latex {b}$ such that $$ \frac{f(b) – f(a)}{b – a} = f'(c), \tag{1}$$
which is to say that there is a point where the slope of $latex {f}$ is the same as the average slope from $latex {a}$ to $latex {b}$.

What if we allow the interval to vary? Suppose we are interested in a differentiable function $latex {f}$ on intervals of the form $latex {[0,b]}$, and we let $latex {b}$ vary. Then for each choice of $latex {b}$, the mean value theorem tells us that there exists $latex {c_b}$ such that $$ \frac{f(b) – f(0)}{b} = f'(c_b). $$
Then the question we consider today is, as a function of $latex {b}$, can $latex {c_b}$ be chosen continuously? We will see that we cannot, and we’ll see explicit counterexamples. This, after the fold.


Posted in Expository, Mathematics | Tagged , , , , | Leave a comment

Review of How Not to Be Wrong by Jordan Ellenberg

Almost 100 years ago as I write this, on 21 October 1914, Martin Gardner was born. He wrote a popular “Mathematical Games” column for Scientific American from 1957 to 1981, introducing a wide audience to fun and recreational mathematics. His influence and writing were so profound that many of his subjects are still popular today. Notable examples include:

Conway’s Game of Life

After its first public appearance in Gardner’s Scientific American column in October 1970, Conway’s Game of Life grew to enormous popularity and interest.


The column “Mathematical Games” started with Gardner’s article on flexagons. The editor of Scientific American thought Gardner’s flexagons was engaging, and suggested that Gardner write a regular column. Fortunately, Gardner acceded.

Public Key Cryptography

The first major public key cryptosystem, the RSA system, first appeared in Gardner’s August 1977 column. (Their formal paper appeared in 1978 in Communications of the Association for Computing Machinery). Now, public key cryptography is used everywhere, all the time, mostly without the conscious thought of the user.

Martin Gardner was in constant contact with many mathematicians, and always looked for interesting recreational mathematics to share with his readers. He inspired an entire generation of mathematicians and math enthusiasts. He also inspired others to pursue popular mathematics writing (and blogging, and even youtubing, such as the excellent series produced by Vi Hart).

The current issue(October/November 2014) of the MAA Focus, a mathematical newsmagazine from the American Mathematical Association, features Martin Gardner. In addition to describing some of Gardner’s contributions and legacy, the article includes a quote from Gardner: “I’ve always thought that the best way to get students interested in mathematics is to give them something that has a recreational flavor — a puzzle or a magic trick or a paradox, or something like that. I think that hooks their interest faster than anything else.” Later, he is also quoted to say “It’s good to to know much about mathematics. I have to work hard to understand anything that I am writing about, so that makes it easier for me to explain it, perhaps, in a way that the general public can understand.”

(As an aside, the Doctor has noted the lack of recreational mathematics in school too)

It is in this noble succession that I consider Jordan Ellenberg’s recent book How Not to Be Wrong: The Power of Mathematical Thinking, for Ellenberg has made a significant effort to make an approachable, inspiring work (even though it’s not recreational math). After reading the book, it seems clear to me that Ellenberg’s beliefs about how to interest people in mathematics mirror Gardner’s. This book is full of paradoxes and magic tricks. Or rather this book is full of captivating stories each centered around a problem or misconception, and whose resolution comes through careful and explicit reasoning.

Ellenberg presents mathematics as “an extension of common sense by other means,” but I get the feeling that he means to blur what it means to be “common sense” and what it means to be “other means” as the book advances. Much as a textbook or college course eases students into the subject, starting simple and getting progressively deeper, Ellenberg starts with problems that are undeniably simple logic and ends with ideas that are truly profound.

The reader is engaged within the first five pages. After a quick justification about learning mathematics — mathematics is reason, and allows for deeper understanding of the world around us — Ellenberg demonstrates that this is not an abstract book about abstract mathematics, but is instead full of actual examples. And he begins with a tale about Abraham Wald, a mathematician and statistician considering where to reinforce the armor of planes during the Second World War. The writing is conversational, as though this were an oral history transcribed and kept safe in written word. To support the claim that mathematics is an extension of common sense, the book alternates between explaining and setting up problems and careful, but common sensical, analysis. And most of the time, he proceeds without overwhelming the reader with arithmetic details or a flood of equations.

Mathematics is not arithmetic. Yes, arithmetic is one tiny part of mathematics, but mathematics is much more. The typical student is overexposed to arithmetic and underexposed to mathematics. Stories like Abraham Wald seek to rectify this imbalance by demonstrating more mathematics. And later stories, like the chapter about challenges facing Netflix analytics — how does Netflix know what movies to recommend? — use equations and arithmetic to support the underlying mathematics.

It might seem like a delicate arrangement to go through so much mathematical reasoning with so little arithmetic, but Ellenberg succeeds. Part of this is certainly that this is a book full of what he calls “simple and profound” mathematics. The simple is what allows the conversational tone. The profound is what makes it interesting. But the larger part is that Ellenberg’s thesis, math is common sense and allows for deeper understanding of the world around us, is fundamentally true. And quite beautiful.

Ellenberg does truly get to some profound mathematics. Some of the chapter is common material for popular mathematics: survivorship bias, statistics lie, and the high likelihood of coincidence, for instance. But in many ways, he goes deeper, and more profound, than I would expect. He examines with great detail the divide in statistics between Fisher’s “significance testing” and Pearson’s “hypothesis testing,” and evidences deep dissatisfaction with the accepted standard in experiments and hypothesis testing of “Reductio ad unlikely.” He not only mentions and cautions misunderstandings about conditional probabilities, but also undertakes Bayesian inference as a decision-making model, perhaps even a good model for how we make our own decisions.

He makes a strong point that sometimes, mathematics does not have all the answers. Or more pertinently, sometimes the answer from mathematics is inaction. For this is action, this not being sure! Although Ellenberg never says it, he hints at the fact that saying anything meaningful about anything at all can be really hard, and sometimes even impossible.

Of course, the book is not without its flaws. Most chapters have their central players, central ideas, and a sort of take home message. But I found the last two chapters to suffer from a bit of indigestion. This might be because they concern the very idea of “existence.” Does public opinion exist as a measurable, or even well-defined quantity? Lurking beneath these two chapters is the problem of designing good, accurate voting systems. Though Ellenberg emphasizes Arrow’s paradox on the impossibility of having a rank order voting system that accurately reflects community opinion, this message is muddied.

And though Ellenberg confronts some of the common misunderstandings of mathematics, like thinking that all mathematics is simple arithmetic and boring, there is one more misunderstanding that I wish he tackled more explicitly, which is that there is room for more mathematics all the time. It is easy to read this book, look at how common sense and mathematics can feel so alike, and sleep comfortably under the sheets at night knowing that these mathematicians have solved all these hard problems for us. But really, more mathematics is needed in both academic and ordinary walks of life.

I think it should also be mentioned that Ellenberg’s rejection of the cult of genius, including the idea that it takes a genius to succeed in mathematics and the far worse idea that we depend on geniuses to progress the sciences, is both good and from an interesting position. Ellenberg was one of the child “geniuses” in the Study of Mathematically Precocious Youth, which found and followed high-performing children and followed them throughout their lives. In an article in the Wall Street Journal, Ellenberg wrote of the dangers of the cult of genius. He also wrote that we need more math majors who don’t become mathematicians. Math and the sciences are not only progressed by the top 0.01 percent, but instead are more often advanced by the hard work and determination of someone who pursued their interests and ignored the cult. For more, read his article. It’s not very long, and it rounds out the end of “How Not to Be Wrong” very nicely.

Ultimately, “How Not to Be Wrong” is a great read that I highly recommend, both to a mathematical and non-mathematical crowd. It’s an engaging and educational read that’s not afraid to do some real math. After finishing the book, part of me wondered if more mathematics should be taught against the history of the mathematicians themselves. Why is it that I learned the development and logic of chemistry along the lives of the chemists of the past while in middle and high school, but I heard almost no mathematician’s name until I began to major in college? This book is literally a tour-de-mathematical-force throughout recent history, and in the spirit of Martin Gardner. I look forward to reading more of his work.

Posted in Book Review, Mathematics | Tagged , , , , , | Leave a comment

Another proof of Wilson’s Theorem

While teaching a largely student-discovery style elementary number theory course to high schoolers at the Summer@Brown program, we were looking for instructive but interesting problems to challenge our students. By we, I mean Alex Walker, my academic little brother, and me. After a bit of experimentation with generators and orders, we stumbled across a proof of Wilson’s Theorem, different than the standard proof.

Wilson’s theorem is a classic result of elementary number theory, and is used in some elementary texts to prove Fermat’s Little Theorem, or to introduce primality testing algorithms that give no hint of the factorization.

Theorem 1 (Wilson’s Theorem) For a prime number $latex {p}$, we have $$ (p-1)! \equiv -1 \pmod p. \tag{1}$$

The theorem is clear for $latex {p = 2}$, so we only consider proofs for “odd primes $latex {p}$.”

The standard proof of Wilson’s Theorem included in almost every elementary number theory text starts with the factorial $latex {(p-1)!}$, the product of all the units mod $latex {p}$. Then as the only elements which are their own inverses are $latex {\pm 1}$ (as $latex {x^2 \equiv 1 \pmod p \iff p \mid (x^2 – 1) \iff p\mid x+1}$ or $latex {p \mid x-1}$), every element in the factorial multiples with its inverse to give $latex {1}$, except for $latex {-1}$. Thus $latex {(p-1)! \equiv -1 \pmod p.} \diamondsuit$

Now we present a different proof.

Take a primitive root $latex {g}$ of the unit group $latex {(\mathbb{Z}/p\mathbb{Z})^\times}$, so that each number $latex {1, \ldots, p-1}$ appears exactly once in $latex {g, g^2, \ldots, g^{p-1}}$. Recalling that $latex {1 + 2 + \ldots + n = \frac{n(n+1)}{2}}$ (a great example of classical pattern recognition in an elementary number theory class), we see that multiplying these together gives $latex {(p-1)!}$ on the one hand, and $latex {g^{(p-1)p/2}}$ on the other.

As $latex {g^{(p-1)/2}}$ is a solution to $latex {x^2 \equiv 1 \pmod p}$, and it is not $latex {1}$ since $latex {g}$ is a generator and thus has order $latex {p-1}$. So $latex {g^{(p-1)/2} \equiv -1 \pmod p}$, and raising $latex {-1}$ to an odd power yields $latex {-1}$, completing the proof $\diamondsuit$.

After posting this, we have since seen that this proof is suggested in a problem in Ireland and Rosen’s extremely good number theory book. But it was pleasant to see it come up naturally, and it’s nice to suggest to our students that you can stumble across proofs.

It may be interesting to question why $latex {x^2 \equiv 1 \pmod p \iff x \equiv \pm 1 \pmod p}$ appears in a fundamental way in both proofs.

This post appears on the author’s personal website davidlowryduda.com and on the Math.Stackexchange Community Blog math.blogoverflow.com. It is also available in pdf note form. It was typeset in \TeX, hosted on WordPress sites, converted using the utility github.com/davidlowryduda/mse2wp, and displayed with MathJax.

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

A bit more about partial fraction decomposition

This is a short note written for my students in Math 170, talking about partial fraction decomposition and some potentially confusing topics that have come up. We’ll remind ourselves what partial fraction decomposition is, and unlike the text, we’ll prove it. Finally, we’ll look at some pitfalls in particular. All this after the fold.

1. The Result Itself

We are interested in rational functions and their integrals. Recall that a polynomial $latex {f(x)}$ is a function of the form $latex {f(x) = a_nx^n + a_{n-1}x^{n-1} + \cdots + a_1x + a_0}$, where the $latex {a_i}$ are constants and $latex {x}$ is our “intederminate” — and which we commonly imagine standing for a number (but this is not necessary).

Then a rational function $latex {R(x)}$ is a ratio of two polynomials $latex {p(x)}$ and $latex {q(x)}$, $$ R(x) = \frac{p(x)}{q(x)}. $$

Then the big result concerning partial fractions is the following:

If $latex {R(x) = \dfrac{p(x)}{q(x)}}$ is a rational function and the degree of $latex {p(x)}$ is less than the degree of $latex {q(x)}$, and if $latex {q(x)}$ factors into $$q(x) = (x-r_1)^{k_1}(x-r_2)^{k_2} \dots (x-r_l)^{k_l} (x^2 + a_{1,1}x + a_{1,2})^{v_1} \ldots (x^2 + a_{m,1}x + a_{m,2})^{v_m}, $$
then $latex {R(x)}$ can be written as a sum of fractions of the form $latex {\dfrac{A}{(x-r)^k}}$ or $latex {\dfrac{Ax + B}{(x^2 + a_1x + a_2)^v}}$, where in particular

  • If $latex {(x-r)}$ appears in the denominator of $latex {R(x)}$, then there is a term $latex {\dfrac{A}{x – r}}$
  • If $latex {(x-r)^k}$ appears in the denominator of $latex {R(x)}$, then there is a collection of terms $$ \frac{A_1}{x-r} + \frac{A_2}{(x-r)^2} + \dots + \frac{A_k}{(x-r)^k} $$
  • If $latex {x^2 + ax + b}$ appears in the denominator of $latex {R(x)}$, then there is a term $latex {\dfrac{Ax + B}{x^2 + ax + b}}$
  • If $latex {(x^2 + ax + b)^v}$ appears in the denominator of $latex {R(x)}$, then there is a collection of terms $$ \frac{A_1x + B_1}{x^2 + ax + b} + \frac{A_2 x + B_2}{(x^2 + ax + b)^2} + \dots \frac{A_v x + B_v}{(x^2 + ax + b)^v} $$

where in each of these, the capital $latex {A}$ and $latex {B}$ represent some constants that can be solved for through basic algebra.

I state this result this way because it is the one that leads to integrals that we can evaluate. But in principle, this theorem can be restated in a couple different ways.

Let’s parse this theorem through an example – the classic example, after the fold.


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