09-20-2022, 06:23 PM
|
#172
|
|
Powerplay Quarterback
|
Quote:
Originally Posted by Bring_Back_Shantz
I knew the answer to this one but couldn't remember exactly why.
Worked it out though.
Spoiler!
There can't be another one.
Call your first prime x, so the other primes are x+2, x+4
We know that xMod3 = 1 or 2, x can't be a multiple of 3 so xMod3 != 0
if xMod3 = 1
(x+2)Mod3 = 0
x+2 is a multiple of 3 so not prime
if xMod3 = 2
(x+4)Mod3 = 0
x+4 is a multiple of 3 so not prime
Visually, without using mod operations, it looks like this
Primes are x, x+2, x+4
we know every 3rd number is multiple of 3, so let's say the smallest multiple of 3 before x = 3a
the sequence of numbers looks like this
3a
3a+1 = x
3a+2 = x+1
3a+3 = x+2 (x+2 is a multiple of 3, so not prime)
3a+4 = x+3
3a+5 = x+4
or
3a
3a+1
3a+2 = x
3a+3 = x+1
3a+4 = x+2
3a+5 = x+3
3a+6 = x+4 (x+4 is a multiple of 3, so not prime)
You've always got a potential prime x+2, or x+4, lined up with a multiple of 3, 3a+3 or 3a+6
So you can't have a run of 3 primes separated by 2, unless one of them is a multiple of 3 and prime, which is of course 3.
|
Nicely done!
|
|
|