Prime time!

What is the smallest non-negative integer that can't be expressed as the sum or difference of two prime numbers?

If you think there is no such number, please provide the answer as 99999.


The answer is 23.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Geoff Pilling
Nov 28, 2016

For 1 to 22 you have:

  • 1 = 3 2 1 = 3-2
  • 2 = 5 3 2 = 5-3
  • 3 = 5 2 3 = 5-2
  • 4 = 2 + 2 4 = 2+2
  • 5 = 3 + 2 5 = 3+2
  • 6 = 3 + 3 6 = 3+3
  • 7 = 5 + 2 7 = 5+2
  • 8 = 5 + 3 8 = 5+3
  • 9 = 11 2 9 = 11-2
  • 10 = 5 + 5 10 = 5+5
  • 11 = 13 2 11 = 13-2
  • 12 = 5 + 7 12 = 5+7
  • 13 = 11 + 2 13 = 11+2
  • 14 = 11 + 3 14 = 11+3
  • 15 = 17 2 15 = 17-2
  • 16 = 5 + 11 16 = 5+11
  • 17 = 19 2 17 = 19-2
  • 18 = 7 + 11 18 = 7+11
  • 19 = 17 + 2 19 = 17+2
  • 20 = 13 + 7 20 = 13+7
  • 21 = 23 2 21 = 23-2
  • 22 = 11 + 11 22 = 11+11

For 23 23 , no sum or difference can be found, since the sum or difference would have to contain an even number, and the only even prime is two. However, neither 21 21 nor 25 25 is prime.

Therefore, 23 \boxed{23} is the smallest such integer.

By Brun's Theorem almost all primes are such "isolated" primes, (i.e., not part of a twin prime pair).

(Also, by Goldbach's conjecture, (though not proved it is likely valid), we can eliminate all the evens right off the bat. :))

Brian Charlesworth - 4 years, 6 months ago

Log in to reply

Ah, Goldbach's conjecture... I didn't realize that all even numbers could be written as the sum of two primes, I wonder about the difference of two primes...

Geoff Pilling - 4 years, 6 months ago

Log in to reply

Well, Polignac's conjecture remains unproven, but that would be a stronger result than we need here, as we just at least one prime gap of length 2 n 2n and we aren't restricting ourselves to consecutive primes. I believe Chen Jingrun at some point proved that every even integer can be expressed as the difference of two (not necessarily consecutive) primes but a citation eludes me at the moment.

One can really go down a rabbit-hole while pursuing open questions regarding primes. It's fun to do every once in a while, but you have to guard against going in too deep. :O

Brian Charlesworth - 4 years, 6 months ago

It is pretty trivial to find solutions for all the non-negative integers up through 22 22 .

I agree that it's trivial, but I think it would help if you wrote up those list of integers to convincingly prove that 23 is indeed the answer.

Pi Han Goh - 4 years, 6 months ago

Log in to reply

Done. Hows that?

Geoff Pilling - 4 years, 6 months ago

Log in to reply

Potential follow-up question: What is the smallest non-negative composite integer that cannot be expressed as the sum or difference of primes?

For this we need to find the first pair of successive primes ( p , q ) (p,q) such that q p > 6 q - p \gt 6 . Then p + 4 p + 4 will be the smallest such composite. The pair ( 89 , 97 ) (89,97) is the first to fit the bill, giving us 93 93 as the answer.

Brian Charlesworth - 4 years, 6 months ago

Yupppers! =D

Pi Han Goh - 4 years, 6 months ago

Why the solution cannot be 0?

Alberto Rossi - 4 years, 6 months ago

Log in to reply

The primes involved do not have to be distinct, so we can have p p = 0 p - p = 0 for any prime p p .

Brian Charlesworth - 4 years, 6 months ago

Log in to reply

@Brian Charlesworth Thanks

Alberto Rossi - 4 years, 6 months ago

Sorry, found the answer

Alberto Rossi - 4 years, 6 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...