The difference between two consecutive primes is called prime gap. Prime gaps are always even except for the prime gap between 2 (the first prime and the only even prime) and 3 (the first odd prime), which is 1.

At first, prime gaps are small. As the primes get bigger, larger prime gaps start to show up. However, that’s not always the case, as twin primes (two consecutive primes with a prime gap of 2) were found even in primes with hundreds of thousands of digits.

When does the prime gap of 10 first appear? Upon inspection of the primes table above, you would see that the answer is 139 and 149.

My question is: When does the prime gap of 100 first appear?

## Solution (Click to Show)

You need to search a lot further to find the solution. The answer is 396,733 and 396,833.

Here’s another challenge for those who are interested: When does the prime gap of 1,000 first appear? (Hint: The primes contain 17 digits!)

Very interesting.

LikeLiked by 1 person

Thanks for reading.

LikeLike

I should write a code and have my system crash! :D

LikeLiked by 1 person

A potato PC that could run Mathematica can easily deal with it though having a CPU with a large number of cores helped a lot :)

LikeLiked by 1 person

:D

LikeLike

Thank you for making me think about this stuff again.

LikeLiked by 1 person

:)

LikeLike

At first I thought they were 1 and 101, because I hadn’t read they were to be consecutive primes. Then, I stopped thinking…. 😉

LikeLiked by 1 person

Thanks for reading.

Anyway, 1 is not a prime :)

LikeLiked by 1 person

🙂

LikeLike