An Explanation of “Sexy Primes”

I Promise This is About Math

Mike Beneschan
7 min readMay 30, 2021
Photo by Marionel Luciano on Unsplash

Personally, I like to think that all math is sexy (except real analysis¹). However, I’m well aware that to most people, math is quite unsexy. Have you tried putting the word “math” anywhere near your Tinder bio? It’s not a good idea, I don’t recommend it.

But if there’s one thing in math that’s undoubtedly sexy, it’s sexy primes, which is a real term I did not make up! So let’s spice up this romantic evening (or morning, or whenever you’re reading this) and go over a bunch of stuff we know about sexy primes.

What are sexy primes?

You might remember that a prime number is a number that can’t be divided by any other number except itself and 1. For example, 5 is prime. You can’t cleanly divide 5 by any other number except 1 and 5. On the other hand, 26 is not prime, because it can be divided by 2 and 13.

A pair of primes are called sexy primes if they differ by 6. The name comes from the Latin word “sex”, which means six. For example, 11 and 5 are sexy primes: they’re both primes and 11–5=6. A few other examples of sexy primes are (23,29),(47,53), and (131,137).

Here is every number from 1 to 300, but with prime numbers marked in blue:

Numbers 1–300 with primes marked in blue (Image by author).

One thing that’s cool (and mysterious) about primes is that we don’t really know what their pattern is. There are general trends (like the Prime Number Theorem, or the fact that primes except 2 are odd), but we don’t know much else about the pattern of primes. Primes seem to be scattered around the number line almost randomly.

Let’s take the same diagram but mark all the sexy primes as well:

Every number from 1–300, with sexy primes marked in red and un-sexy primes marked in blue (Image by author).

You’ll notice that most of the primes under 300 are sexy. And that’s because math is beautiful or something.

The Largest Sexy Primes

The largest known sexy primes are each over 50,500 digits long, which is huge. For reference, this entire post is only about 7,800 characters long. The primes were found by Peter Kaiser in 2019, and the shorter way to write them is like this:

  • (520461 × 2⁵⁵⁹³¹+1) × (98569639289 × (520461 × ²⁵⁵⁹³¹–1)²–3)-1
  • (520461 × 2²⁵⁵⁹³¹+1) × (98569639289 × (520461 × 2²⁵⁵⁹³¹–1)²–3)+5

It goes without saying that these numbers are incredibly sexy. Also, you can view all 50,539 digits of these sexy primes here (smaller prime) and here (bigger prime).

Infinitely Sexy

Are there infinitely many sexy primes?

As we’ve gone over, sexy primes are primes that differ by 6. But there are also twin primes which differ by 2, and cousin primes which differ by 4.

We’ve known since the time of Euclid (c. 300 BC) that there are infinitely many primes, but we don’t know if there are infinitely many twin primes. This is unproven, and often called the “Twin Prime Conjecture.”

Similarly, we don’t know if there are infinitely many sexy primes, but there is a way we could get closer to figuring this out. There’s something called the “generalized Elliott–Halberstam conjecture,” which I’m not going to go into because it’s complicated. But basically, in 2014 The Polymath Project showed that if the generalized Elliot-Halberstam conjecture is true, that would imply there are infinitely many pairs of primes that differ by 6 or less. This is not the same as saying there are infinitely many primes that differ by exactly 6 (sexy primes), but that there are infinitely many primes that differ by 2, 4, or 6 (twin primes, cousin primes, or sexy primes)².

On the other hand, the Polymath Project also showed that without assuming the generalized Elliot-Halberstam conjecture, we can prove there are infinitely many primes that differ by 246 or less. What are two primes that differ by 246? Well, (5,251) for example. As far as I can tell there is not a name yet for primes that differ by 246. Following the trend of twin primes, cousin primes, and sexy primes, I propose that primes that differ by 246 should be called distant-acquaintance-you-met-once primes³.

The Only Sexy Prime Quintuplet

By definition, sexy primes come in pairs. If you have a sequence of 3 primes that all differ by 6, like (17, 23, 29), that’s called a sexy prime triplet. There are lots and lots of sexy primes and sexy prime triplets (as mentioned before, maybe infinitely many). However, there is only one sexy prime quintuplet, a sequence of 5 primes that all differ by 6.

We can prove that this is the only sexy prime quintuplet that can possibly exist:

5, 11, 17, 23, 29

Here’s how. Pretend I have some prime number p, and I make a sexy prime quintuplet like so:

p, (p+6), (p+12), (p+18), (p+24)

Something interesting happens if we divide all of these numbers by 5. Imagine p has a remainder of 0 when we divide it by 5. In other words, p is some multiple (n) of 5 plus 0:

p=5n+0

If we divide (p+6) by 5, we will get a remainder of 1. This is because p has a remainder of 0 when we divide by 5, and 6 has a remainder of 1 when we divide by 5. Adding up the remainders, (p+6) has a remainder of 1. Similarly, (p+12) has a remainder of 2, (p+18) has a remainder of 3, and (p+24) has a remainder of 4.

Now imagine p has a remainder of 3 instead (in other words, p=5n+3). This now means that (p+6) has a remainder of 4 when we divide by 5, since there is a remainder of 3 from p and a remainder of 1 from 6. The next number, (p+12), has a remainder of 0, not 5. Remember, we are dividing (p+12) by 5. It’s true that (p+12) has a remainder of 3 from p and a remainder of 2 from 12, but there is no such thing as a remainder of 5 when we divide by 5. That is a multiple of 5. Thus (p+12) has a remainder of 0 instead (as an example, if p=3, then (p+12) = 3+12 = 15, which is a multiple of 5, so it has a remainder of 0).

The point is, if we divide a number by 5 there are only five possible remainders: 0,1,2,3,4. The sequence p, (p+6), (p+12), (p+18), (p+24) has all 5 possible remainders, but we don’t know which number has which remainder.

…Or do we?

The number p is prime, and a prime number can’t be divided by any number other than itself and 1. On the other hand, dividing by 5 and getting a remainder of 0 means the number is divisible by 5. As we saw, one of the prime numbers in the sequence (p, p+6, p+12, p+18, p+24) must have a remainder of 0, and thus must be divisible by 5. The only prime number that’s divisible by 5 is 5, so 5 must be in our sequence. From there we can see that 5 must be the first number in the sequence (p), and so we get the only possible sexy prime quintuplet:

5, (5+6), (5+12), (5+18), (5+24) = 5, 11, 17, 23, 29

Does any of this matter?

Not really!

In the Numberphile video on sexy primes (recommended), James Grime plainly states, “Let’s be honest, the reason we’re doing this video is because it has a funny name.” Sexy primes probably won’t help us invent a new type of nuclear fission, or solve some problem in quantum physics.

But they’re fun. Honestly, we look at “sexy primes” simply so we can learn more about primes and their mysterious patterns (and because it has a funny name). You can fall deep into the rabbit hole of prime numbers, and “sexy primes” are one part of the enormous prime number landscape. They’re also by far the most romantic part.

Stay sexy.

Notes

¹: Before you real analysis stans (“stanalysts”) send me angry emails, I’ll acknowledge there are a lot of cool things in real analysis too! It just was not my thing in undergrad. I’m sure real analysis is sexy too once you get to know it.

²: You might be wondering, what about primes that differ by 1, 3, or 5? Well, if p is prime, then one number out of (p, p+1) must be even (same for (p, p+3) and (p, p+5)). The only even prime is 2, so there is exactly 1 pair of primes each that differ by 1, 3, and 5. They are (2,3), (2,5), and (2,7), respectively.

³: “Daymo primes” for short.

--

--

Mike Beneschan
Mike Beneschan

Written by Mike Beneschan

A human, writing (mostly) about math | California | If you want to reach out mikebeneschan@gmail.com | Get the newsletter here: https://bit.ly/3Ahfu98

No responses yet