The prime numbers have fascinated mathematicians for many centuries. As far back as 300 BCE, Euclid proved that there are infinitely many primes.

Today, part of the appeal of prime numbers is that there remain many apparently-simple questions about primes whose answers are unknown. (One famous example is Goldbach’s conjecture, posed in 1742 in a letter to Leonhard Euler, that every even integer > 2 can be written as the sum of two primes. Note, however, that Terence Tao has recently proven that every odd integer > 1 is the sum of at most 5 primes).

Over the years, the math (and its conjectures) has gotten considerably more complicated. The most famous (infamous?) example is the Riemann hypothesis; let me just drop the statement on you:

Riemann’s hypothesis: The nontrivial zeroes of the Riemann zeta function have real part = 1/2.

Don’t worry if you don’t have the mathematical background to make sense of this statement, but do note that it carries a hefty reward if it’s proven: the Clay Math Institute is offering $1 million for a solution to this problem.

In this post, I’m going to reverse the historical trend: I will begin with something complicated and deep, and use it to derive something quite simple.

First, let’s take the imaginary parts of the Riemann zeta function’s zeroes:

14.134725142, 21.022039639, 25.010857580, 30.424876126, etc.

My list goes up to the 100th one, at 236.524229665. Let Z*n* be the *n*th entry in this list, and now define the function F(x) according to the following rule:

Clearly, F depends on our choice of N, which is where things get interesting. Here’s a graph for N = 5 (click to enlarge):

Neat, but not very enlightening. (By the way, note that the vertical axis is at x=5, not x=0.) But what if we take N = 20?

Notice where those major dips occur: at x = 2, 3, 5, 7, etc. We’ve found some prime numbers! And it keeps getting better—here’s the graph for N = 100:

Notice that while the primes cause the most pronounced dips, other numbers produce more moderate dips—look at 4, 9, 8, and 16 for the best four examples of this. And some numbers don’t correspond to anything significant in the graph—see 6, 10, 12, 14, 15, and 18.

Take a second to reflect on this: we’ve used the zeroes of the Riemann zeta function (the “gun” from the title) to find the sequence of prime numbers (the “knife fight”)! And along the way, we’ve found a correspondence between the analytic properties of F(x) and some non-prime numbers! And, as you might imagine, the graph of F(x) will produce more accurate values as N increases.

Clearly, there’s a theorem lurking in the background of this. Unfortunately, I can’t offer a reference. I remember seeing someone speak about it at a conference, and I hastily wrote down the formula, but that’s all the information I have. So if anyone recognizes this, or has any insight on the non-prime dips, let me know!

The non-prime dips appear to happen at powers of primes.

Yes, that seems to be the trend!