# Why are math geeks so obsessed with prime numbers?

**URL:** <https://boards.straightdope.com/t/why-are-math-geeks-so-obsessed-with-prime-numbers/470161>\
**Category:** Factual Questions\
**Created:** [October 29, 2008, 11:25pm UTC](https://boards.straightdope.com/t/why-are-math-geeks-so-obsessed-with-prime-numbers/470161 "2008-10-29T23:25:06Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Charlie\_Tan](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/charlie_tan/32/12582_2.png) [@Charlie\_Tan](https://boards.straightdope.com/u/Charlie_Tan)\
**Post date:** [October 29, 2008, 11:25pm UTC](https://boards.straightdope.com/t/why-are-math-geeks-so-obsessed-with-prime-numbers/470161/1 "2008-10-29T23:25:06Z")

</div>

I work with a math geek and he can’t explain it to my understanding.

So I’m asking you guys. What is it with prime numbers that make math geeks go ga-ga? I’m sure there’s some use for them in some part of theoretical math. I’m also sure there’s some inherent beauty that only math geeks see.

But in layman’s terms: why are they important?

---

<div class="post-metadata">

**Author:** ![Ximenean](https://avatars.discourse-cdn.com/v4/letter/x/aca169/32.png) [@Ximenean](https://boards.straightdope.com/u/Ximenean)\
**Post date:** [October 29, 2008, 11:47pm UTC](https://boards.straightdope.com/t/why-are-math-geeks-so-obsessed-with-prime-numbers/470161/2 "2008-10-29T23:47:13Z")

</div>

There are practical reasons why they’re important, but from a more aesthetic point of view, prime numbers are to non-primes as chemical elements are to compounds. All other natural numbers (well, except one) are made of prime numbers, in a sense. Six can be constructed from groups of two or groups of three, for example, but seven is just seven.

---

<div class="post-metadata">

**Author:** ![friedo](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@friedo](https://boards.straightdope.com/u/friedo)\
**Post date:** [October 29, 2008, 11:51pm UTC](https://boards.straightdope.com/t/why-are-math-geeks-so-obsessed-with-prime-numbers/470161/3 "2008-10-29T23:51:52Z")

</div>

In equal-tempered musical tuning systems with a prime number of equally spaced notes per octave, you can start on any note and cycle through all of them with any interval.

Big prime numbers are highly useful in cryptography and cryptanalysis.

So there’s two examples. And I’m not even a math geek.

---

<div class="post-metadata">

**Author:** ![Mbossa](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@Mbossa](https://boards.straightdope.com/u/Mbossa)\
**Post date:** [October 30, 2008, 12:08am UTC](https://boards.straightdope.com/t/why-are-math-geeks-so-obsessed-with-prime-numbers/470161/4 "2008-10-30T00:08:07Z")

</div>

I’d imagine that at least part of it is that a large proportion of unsolved problems in mathematics involve prime numbers, and geeks naturally gravitate toward unsolved problems.

---

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [October 30, 2008, 12:11am UTC](https://boards.straightdope.com/t/why-are-math-geeks-so-obsessed-with-prime-numbers/470161/5 "2008-10-30T00:11:11Z")

</div>

Because they can be kind of spooky, if you look at them the right way: So far as we’ve ever been able to prove, there is no pattern to prime numbers, no simple formula that will tell you where the next prime is given the highest prime you know now. But there are fuzzier patterns to the distribution of primes, patterns that jump out at you if you plot them correctly. [Ulam’s spiral](http://en.wikipedia.org/wiki/Ulam_spiral) is one of them and it isn’t alone. Why does Ulam’s Spiral have so many straight lines? Nobody knows, so far as I know.

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [October 30, 2008, 12:23am UTC](https://boards.straightdope.com/t/why-are-math-geeks-so-obsessed-with-prime-numbers/470161/6 "2008-10-30T00:23:09Z")

</div>

The reason we love prime numbers is the [fundamental theorem of arithmetic](http://en.wikipedia.org/wiki/Fundamental_theorem_of_arithmetic). For the longest time, no applications were known, and so number theory was the only area of math that was completely pure. Pure mathematicians like that sort of thing.

> [@Derleth](#):
>
> Because they can be kind of spooky, if you look at them the right way: So far as we’ve ever been able to prove, there is no pattern to prime numbers, no simple formula that will tell you where the next prime is given the highest prime you know now.

In fact, there’s a very simple formula. Let s(t) be equal to 1 if t is true, and 0 if t is false. Then with n(k) = (k + 1)s(k + 1 is prime) + n(k + 1)s(k + 1 is not prime), n(k) denotes the next prime after k. But what that doesn’t give you is an efficient way to compute the next prime after any given number, which is what you meant to say.

> [@](#):
>
> But there are fuzzier patterns to the distribution of primes, patterns that jump out at you if you plot them correctly. [Ulam’s spiral](http://en.wikipedia.org/wiki/Ulam_spiral) is one of them and it isn’t alone. Why does Ulam’s Spiral have so many straight lines? Nobody knows, so far as I know.

Does Ulam’s Spiral have a notable number of straight lines?

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [October 30, 2008, 1:53am UTC](https://boards.straightdope.com/t/why-are-math-geeks-so-obsessed-with-prime-numbers/470161/7 "2008-10-30T01:53:19Z")

</div>

> [@](#):
>
> But there are fuzzier patterns to the distribution of primes, patterns that jump out at you if you plot them correctly. Ulam’s spiral is one of them and it isn’t alone. Why does Ulam’s Spiral have so many straight lines? Nobody knows, so far as I know.

It seems pretty simple, to me. A plot of all of the composite numbers should show exactly the same patterns as a plot of all of the primes, right? Well, a plot of all composite numbers will contain all of the multiples of 2, and those form a pattern, and it’ll contain all the multiples of 3, and those form a pattern, and all the multiples of 5, and those form a pattern, and so on. So when you look at a plot of all composite numbers, you see all of those patterns, and when you look at a plot of all primes, you see the same thing, only in negative.

---

<div class="post-metadata">

**Author:** ![Hypnagogic\_Jerk](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/hypnagogic_jerk/32/4252_2.png) [@Hypnagogic\_Jerk](https://boards.straightdope.com/u/Hypnagogic_Jerk)\
**Post date:** [October 30, 2008, 2:50am UTC](https://boards.straightdope.com/t/why-are-math-geeks-so-obsessed-with-prime-numbers/470161/8 "2008-10-30T02:50:35Z")

</div>

> [@Derleth](#):
>
> Because they can be kind of spooky, if you look at them the right way: So far as we’ve ever been able to prove, there is no pattern to prime numbers, no simple formula that will tell you where the next prime is given the highest prime you know now.

We don’t know the exact position of prime numbers, but we do know their asymptotic distribution. See for example the [Prime Number Theorem](http://en.wikipedia.org/wiki/Prime_number_theorem). Primes actually follow rather specific patterns, even though it’s not obvious why they should. I think that’s part of their appeal.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [October 30, 2008, 2:58am UTC](https://boards.straightdope.com/t/why-are-math-geeks-so-obsessed-with-prime-numbers/470161/9 "2008-10-30T02:58:02Z")

</div>

> [@ultrafilter](#):
>
> In fact, there’s a very simple formula. Let s(t) be equal to 1 if t is true, and 0 if t is false. Then with n(k) = (k + 1)s(k + 1 is prime) + n(k + 1)s(k + 1 is not prime), n(k) denotes the next prime after k. But what that doesn’t give you is an efficient way to compute the next prime after any given number, which is what you meant to say.

Even simpler: let n(k) be equal to the next prime after k. FIN 🙂

No point wrangling it into semi-“arithmetic” form, given the fairly un-arithmetic definition of s. But your point is one well worth making. There are obviously algorithms (even simple, obvious algorithms) to generate primes; their only flaws are questions of efficiency and aesthetics.

---

<div class="post-metadata">

**Author:** ![nivlac](https://avatars.discourse-cdn.com/v4/letter/n/3bc359/32.png) [@nivlac](https://boards.straightdope.com/u/nivlac)\
**Post date:** [October 30, 2008, 3:00am UTC](https://boards.straightdope.com/t/why-are-math-geeks-so-obsessed-with-prime-numbers/470161/10 "2008-10-30T03:00:32Z")

</div>

\*\*Why are math geeks so obsessed with prime numbers? \*\*  
(1) As already pointed out, every whole number larger than 1 can be uniquely factored into its prime components. So the prime numbers are like the building blocks for all the counting numbers that you’re familiar with. So they are very basic in that sense.  
(2) There are lots of well-known problems involving prime numbers. Some have been solved, while others have eluded solution for the longest time. What’s really confounding about these unsolved problems is that they’re so damn easy to state and understand, yet their solutions have eluded the greatest minds up to now.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [October 30, 2008, 3:05am UTC](https://boards.straightdope.com/t/why-are-math-geeks-so-obsessed-with-prime-numbers/470161/11 "2008-10-30T03:05:32Z")

</div>

> [@friedo](#):
>
> In equal-tempered musical tuning systems with a prime number of equally spaced notes per octave, you can start on any note and cycle through all of them with any interval.

Yes, that’s true (well, except for intervals which are multiples of octaves). Is that… is that actually something musicians concern themselves with?

---

<div class="post-metadata">

**Author:** ![Monkey\_Chews](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@Monkey\_Chews](https://boards.straightdope.com/u/Monkey_Chews)\
**Post date:** [October 30, 2008, 4:51am UTC](https://boards.straightdope.com/t/why-are-math-geeks-so-obsessed-with-prime-numbers/470161/12 "2008-10-30T04:51:03Z")

</div>

> [@nivlac](#):
>
> What’s really confounding about these unsolved problems is that they’re so damn easy to state and understand, yet their solutions have eluded the greatest minds up to now.

Are you talking about things like the [Riemann Hypothesis](http://en.wikipedia.org/wiki/Riemann_hypothesis)? I read a fascinating [book](http://www.amazon.com/Music-Primes-Searching-Greatest-Mathematics/dp/0066210704) about this recently, and about the only thing it didn’t have was a simply stated expression of what the problem actually was. I mean, I got that it was that the zero solutions of a certain function on the complex number plane all lie alone a line (and at the time I think I had a vague understanding of how this function and its solutions related to prime numbers, although I’m stuffed if I can remember exactly what that is a few months later). But a couple of people who saw me reading it asked me to explain exactly what the Riemann Hypothesis was and I just pretty much went… “Ummm…”

Anyone able to explain what the problem posed by the Riemann Hypothesis is, in a way that is “easy to state and understand” for someone with not much more than high school maths?

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [October 30, 2008, 5:12am UTC](https://boards.straightdope.com/t/why-are-math-geeks-so-obsessed-with-prime-numbers/470161/13 "2008-10-30T05:12:43Z")

</div>

There is a unique function Zeta(s) from complex numbers to complex numbers with the following three properties:

A: It is defined for all inputs except 1  
B: Wherever it is defined, it has a derivative  
C: Wherever the infinite series 1/1^s + 1/2^s + 1/3^s + 1/4^s + … converges, the value of Zeta(s) equals the sum of that series

It’s known that every negative even integer is a zero of this function. The Riemann Hypothesis is the assertion that all the other zeros have real component 1/2.

Is that simple enough?

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [October 30, 2008, 5:27am UTC](https://boards.straightdope.com/t/why-are-math-geeks-so-obsessed-with-prime-numbers/470161/14 "2008-10-30T05:27:38Z")

</div>

As for the relevance of the Zeta function to prime numbers, there are lots of connections, most of which I am not qualified to discuss. However, the main one is the fact that the infinite series in condition C is equivalent to the reciprocal of (1 - 1/2^s) (1 - 1/3^s) (1 - 1/5^s) (1 - 1/7^s) (1 - 1/11^s) …, where this product contains a term for each prime. (The equivalence is in the sense that wherever one converges, the other does to the same value as well. It’s actually rather straightforward to show, following from the Fundamental Theorem of Arithmetic (that every positive integer has a unique prime factorization).)

---

<div class="post-metadata">

**Author:** ![TJdude825](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@TJdude825](https://boards.straightdope.com/u/TJdude825)\
**Post date:** [October 30, 2008, 6:10am UTC](https://boards.straightdope.com/t/why-are-math-geeks-so-obsessed-with-prime-numbers/470161/15 "2008-10-30T06:10:23Z")

</div>

In addition to the Riemann Hypothesis (which I’ve certainly heard of but I don’t recall what it is so I couldn’t explain it) there is the [Goldbach Conjecture](http://en.wikipedia.org/wiki/Goldbach%27s_conjecture). And wouldn’t you know it, Wikipedia has a whole category of [Conjectures about prime numbers](http://en.wikipedia.org/wiki/Category:Conjectures_about_prime_numbers).

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [October 30, 2008, 6:18am UTC](https://boards.straightdope.com/t/why-are-math-geeks-so-obsessed-with-prime-numbers/470161/16 "2008-10-30T06:18:31Z")

</div>

If you want a less complex unsolved problem involving primes, here are a couple of good ones:

**The Goldbach Conjecture:** Every even number greater than 2 can be expressed as the sum of two prime numbers. For instance, 4 = 2+2, and 110 = 107 + 3 (many numbers can be broken down multiple ways). It’s been tested up to absurdly high numbers, and it’s always worked out, but nobody’s ever been able to come up with a general proof, and many folks suspect that a general proof is impossible.

**The Twin Prime Conjecture:** A pair of twin primes is just two primes that are separated by 2, such as 5 and 7, or 107 and 109. The Twin Prime Conjecture quite simply says that there are an infinite number of such pairs. Again, it’s widely suspected to be true, but there’s even less progress on proving it than there is for the Goldbach conjecture.

---

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [October 30, 2008, 11:44am UTC](https://boards.straightdope.com/t/why-are-math-geeks-so-obsessed-with-prime-numbers/470161/17 "2008-10-30T11:44:08Z")

</div>

> [@ultrafilter](#):
>
> In fact, there’s a very simple formula.

You misread. (Look at the clause immediately prior to the one you (apparently) responded to: The distribution of primes on the number line does not form a pattern in any reasonable sense of the term.) A simple formula would be like the one that gets you the next harmonic number.

> [@](#):
>
> Does Ulam’s Spiral have a notable number of straight lines?

If it didn’t nobody would talk about it, would they? Given the chaotic positioning of primes on a straight number line, the result of Ulam’s experiment should have looked like a TV set tuned to a dead channel, but it only _almost_ does. The lines are _spooky_.

---

<div class="post-metadata">

**Author:** ![friedo](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@friedo](https://boards.straightdope.com/u/friedo)\
**Post date:** [October 30, 2008, 4:02pm UTC](https://boards.straightdope.com/t/why-are-math-geeks-so-obsessed-with-prime-numbers/470161/18 "2008-10-30T16:02:46Z")

</div>

> [@Indistinguishable](#):
>
> Yes, that’s true (well, except for intervals which are multiples of octaves). Is that… is that actually something musicians concern themselves with?

No, but composers and theorists who like to dick around with unusual tunings find it amusing.

---

<div class="post-metadata">

**Author:** ![Tom\_Tildrum](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@Tom\_Tildrum](https://boards.straightdope.com/u/Tom_Tildrum)\
**Post date:** [October 30, 2008, 4:21pm UTC](https://boards.straightdope.com/t/why-are-math-geeks-so-obsessed-with-prime-numbers/470161/19 "2008-10-30T16:21:33Z")

</div>

Prime numbers are one of the few mathematical concepts that might readily translate into money, thanks to their use in cryptography.
