Probability that $2n$ has no Goldbach partitions.

I'm trying to evaluate the probability that some even integer $$2n$$ has no Goldbach partitions using the following approach...

First, visualize the distribution of primes from $$1$$ to $$n$$ as a binary string representing odd integers, with $$1$$ for primes and $$0$$ for composites:

$$011101101101001...$$

Now in order for $$2n$$ to have no Goldbach partitions, the following binary sequence (from $$n$$ to $$2n$$), spelled backward, would have to be of the form:

$$x000x00x00x0xx0...$$

This means that prime numbers from $$n$$ to $$2n$$ would have to be distributed within the $$x$$'s.

In order to get the probability that $$2n$$ has no Goldbach partitions, we can calculate the ratio of the number of possible distribution of primes from $$n$$ to $$2n$$ within the $$x$$'s, over the total number of possible distribution of primes from $$n$$ to $$2n$$.

Number of primes from $$n$$ to $$2n$$: $$\pi\left(2n\right)-\pi\left(n\right)$$

Number of odd integers from $$n$$ to $$2n$$: $$\frac{n+1}{2}$$

Number of odd composites from $$1$$ to $$n$$ (number of $$x$$'s): $$\frac{n+3}{2}-\pi\left(n\right)$$

Number of possible distributions of primes from $$n$$ to $$2n$$: $$\frac{\left(\frac{n+1}{2}\right)!}{\left(\pi\left(2n\right)-\pi\left(n\right)\right)!\left(\frac{n+1}{2}-\left(\pi\left(2n\right)-\pi\left(n\right)\right)\right)!}$$

Number of possible distribution of primes from $$n$$ to $$2n$$ within the $$x$$'s: $$\frac{\left(\frac{n+3}{2}-\pi\left(n\right)\right)!}{\left(\pi\left(2n\right)-\pi\left(n\right)\right)!\left(\left(\frac{n+3}{2}-\pi\left(n\right)\right)-\left(\pi\left(2n\right)-\pi\left(n\right)\right)\right)!}$$

Probability $$P$$ that $$2n$$ has no Goldbach partitions:

$$P\approx\frac{\left(\frac{n+3}{2}-\pi\left(n\right)\right)!\left(\frac{n+1}{2}-\pi\left(2n\right)+\pi\left(n\right)\right)!}{\left(\frac{n+1}{2}\right)!\left(\frac{n+3}{2}-\pi\left(2n\right)\right)!}$$

Questions:

1: This approach does not take into account the fact that $$3$$ consecutive odd integers cannot be all primes. I need to show whether this fact decrease or increase the value of $$P$$.

2: A quick search about this subject shows some other formulas to approximate $$P$$, like for example:

$$\prod_{a=2}^{n/2}\left(1-\frac 1{\log a\cdot \log (n-a)}\right)$$

but the values for $$P$$ obtained from those formulas are incredibly higher than what i get with mine. Could it be only because of the fact from question 1, or is there a problem with the whole approach ?

Some results for $$P$$ using my formula: • I am not sure whether the probability for $2n=8194$ is realistic. – Peter Jun 4 at 17:28
• It's difficult to see how a probability can be negative. My personal handwaving might suggest $\left( 1- \frac{1}{(\log_e (2n))^2}\right)^n$ which is a lot higher than yours – Henry Jun 4 at 17:36
• Sorry for the negatives, should have been 0, it only happens a couple of times below 100, because there is less non-primes in the first half than the number of primes in the second half – François Huppé Jun 4 at 17:41
• Goldbach only cares about certain subsets of primes for any given n. – Roddy MacPhee Jun 5 at 14:11

$$n^2\bmod 3\to p\equiv q\bmod 6\\n^2\bmod 2\to p\equiv q \bmod 4\\p\equiv q\bmod 4\land p\equiv q\bmod 6\implies p\equiv q\bmod 12\\p\not\equiv q\bmod 4\land p\not\equiv q\bmod 6\implies p\not\equiv q\bmod 12\\ \gcd(n,p)=gcd(n,q)=1$$