15

So I was thinking about the Goldbach conjecture and I rephrased it to myself as the following:

Prove that every number N is either prime or else lies halfway between two primes A and B, where A < N and N < B < 2N.

This is equivalent, because if it were true, then the following would apply:

  1. For any even number X where X/2 is prime, you know X is expressible by the sum of two primes: X/2 + X/2. (e.g. for 10, 10/2 is 5 and 5+5=10)

  2. For any even number X where X/2 is NOT prime, you know X is expressible by the sum of two primes: A + B, where A and B are whichever two primes X/2 lies between. (e.g. for 12, 12/2 is 6 and 6 is halfway between 5 and 7, and 5+7=12)

And thus the Goldbach Conjecture would be proven true, because all even numbers are proven to be expressible as the sum of two primes.


So then I went and generated the first 400 values for N of the sequence where N is "the shortest distance from X to the nearest prime number both above and below it" where X is the natural numbers 1, 2, 3, etc. If X is prime, N is 0.

Example:

2 yields 0 because it is prime.
3 yields 0 because it is prime.
4 yields 1 because it is 1 away from both 3 and 5.
5 yields 0 because it is prime.
6 yields 1 because it is 1 away from both 5 and 7.
....
10 yields 3 because it is 3 away from 7 and 13.
11 yields 0 because it is prime.
12 yields 1 because it is 1 away from 11 and 13.

So, the sequence starts off: 001 010 323 010 323 010. Already tantalizing, like everything with primes.

But then, that segues into this:

23 010 32 9056349 010 9436509 23 010 32

A palindrome! (They're all single digit numbers, grouped to help make the palindromic nature more visually evident.)

Further in you'll see:

10 9 0 1 0 15 4 3 18 7 0 9 8 3 12 5 0 15 2 15 0 5 12 3 8 9 0 7 18 3 4 15 0 1 0 9 10

Another palindrome. (This time with all numbers separate since some are two digits long. Also bolded the center of the palindrome.)

These are just the ones I've spotted, I think there are others. And there are many others I've seen that are one value away from being palindromic.

Is there any explanation for this? I'm trying to find a pattern here.

temporary_user_name
  • 643
  • 2
  • 8
  • 24
  • 1
    I'm pretty sure your phrasing isn't equivalent. Is 3 halfway between two primes? (1 is not prime.) – hexaflexagonal Jun 24 '15 at 20:00
  • If you prove all numbers are either prime or halfway between two primes, then every even number must be expressable as the sum of two primes. So I don't think there's a difference. – temporary_user_name Jun 24 '15 at 20:01
  • If 3 being prime was disregarded, 6 would not be expressable as the sum of two primes and we would have disproved Goldbach's conjecture already. So distances of zero count. – temporary_user_name Jun 24 '15 at 20:03
  • 1
    Maybe my phrasing isn't ideal, but think of it as "3 is halfway between 3 and 3." Distances of 0 count. I'm just not sure how to say that properly. – temporary_user_name Jun 24 '15 at 20:05
  • Oh, I see what you mean. (Of course, you'll still need to exclude 1.) – hexaflexagonal Jun 24 '15 at 20:07
  • Yes, that's correct. – temporary_user_name Jun 24 '15 at 20:07
  • Sorry for the confusion. Anyway, this is a really interesting observation! – hexaflexagonal Jun 24 '15 at 20:10
  • Thanks! It's been keeping my mind off work all day. – temporary_user_name Jun 24 '15 at 20:10
  • 1
    It seems that there is a pattern and I found this interesting. However when you take a random sequence of numbers won't you find some palindrom somewhere of some length ? I mean, the first palindrom is long but I would blame it on the necessary low values of gaps and the second is not that long... – Clément Guérin Jun 24 '15 at 20:45
  • I have considered that too, but I don't think so. These are pretty large subsequences, visible immediately, and you can find AMAZINGLY similar ones throughout. For instance "ABCXEDF D EYCBA" -- one value out of place. It's like there's an evolution. Moreover, the subsequence 94365 occurs over and over many times, as does 32010. There is almost certainly some devilish pattern at work. But that's how it always is with primes... – temporary_user_name Jun 24 '15 at 20:49
  • 1
    I have already tried to find something like a pattern appearing in problems involving prime numbers. I ended by realizing that it was nothing but my imagination. I do not say that it is the case in the present situation. – Clément Guérin Jun 24 '15 at 20:51
  • I understand completely. – temporary_user_name Jun 24 '15 at 20:51
  • 1
    I will try it myself then. Maybr you can add some statistics like how many palindroms befor $10$, $100$, $1000$, which length? – Clément Guérin Jun 24 '15 at 20:52
  • I have not had the opportunity yet to gather that info. I would like to analyze this further when I can, yes. – temporary_user_name Jun 24 '15 at 20:53
  • @ClémentGuérin by the way the second palindrome is actually longer than the first; I think you miscounted. – temporary_user_name Jun 25 '15 at 18:36
  • 1
    http://oeis.org/A047160 (and the "symmetrical plot" linked to there) might be of interest. – Barry Cipra May 08 '18 at 13:29
  • 4
    @Aerovistae I think there is (in part) an artifact. A palindrome in the sequence of gaps between primes will automatically yield a palindrome in your sequence. For instance, if you consider the following sequence (where $0$ denotes a prime number and $x$ denotes a composed number): $0xxx0x0xxx0xxxxx0x0xxxxx0xxx0x0xxx0$, then you automatically obtain the sequence $0x2301032905634901094365092301032x0$ as a result. In other words, this latter palindrom simply reflects a much smaller palindrom in the following sequence of prime gaps: $4,2,4,6,2,6,4,2,4$. How often these occur is another question. – yoann May 08 '18 at 13:32
  • @yoann nicely observed! True indeed. You may want to consider putting that forward as an answer since I think it answers the question. – temporary_user_name May 08 '18 at 13:36
  • 1
    @BarryCipra that is indeed the same sequence I found! I didn't think to search OEIS since math isn't really my field; didn't even occur to me. – temporary_user_name May 08 '18 at 13:38
  • 1
    @BarryCipra that symmetrical plot is really interesting. I'm not sure how to read it, have to research that. – temporary_user_name May 08 '18 at 13:41
  • 3
    A palindrome in the positions of primes makes a long palindrome in this sequence of numbers more likely, but not guaranteed. For example: 0-----0-2301032-0-----0 (zeroes are primes; and I included the values of your function for the longest palindromic substring). – David Schneider-Joseph May 08 '18 at 13:43

0 Answers0