# Looking for n for which all 2-partitions are prime partitions.

Discussion in 'Mathematica' started by Gilmar, Sep 9, 2005.

1. ### GilmarGuest

Dear Mathematica User Group:

Is it possible to find an even number n => 4 such that the values
(n - Prime) are primes for ALL integers i in the interval
[1, PrimePi[n/2]]? In other words; does an n exists having a
corresponding set {{a,b}: (a + b) = n, with all a,b element of Primes}?

A way to begin attacking this problem follows:

Let "PrimeP" be the set of prime partition points {p,q} corresponding
to n, such that n = p + q; p and q are prime; and p is less or equal
than q.

Let "CompP" be the set of composite partition points {p,q}
corresponding to n, such that n = p + q; p is prime but, q is
composite; and p is less or equal than q.

Let "AllP" be the (disjoint) union of the sets PrimeP and CompP.

Let "LPrimeP", "LCompP", and "LAllP" denote the lengths of the sets
PrimeP, CompP, and AllP, respectively.

For what n's is LPrimeP > LCompP?

A program for heuristic exploration of this later question follows :

Off[General::"spell1"]

Clear[LAll,LPrimeP,LCompP]

LAllP[n_Integer?Positive]:=Length[[email protected]{n-#,#}&@
Select[[email protected]@PrimePi[n/2],IntegerQ]]

LPrimeP[n_Integer?Positive]:=Length[[email protected]{n-#,#}&@
Select[[email protected]@PrimePi[n/2],PrimeQ]]

LCompP[n_Integer?Positive]:=Block[{c},c=(LAllP[n]-LPrimeP[n]);c]

For[n=4,n<Infinity,If[LPrimeP[n]>LCompP[n],
Print[{n,LPrimeP[n],LCompP[n]}]];n+=2]

After running this program for a while;
the value {30030,905,850} is eventually reached.
Unfortunately, seeking n > 30030 implies me
having to abort the program, since it stalls forever.

I'm just wondering if anyone could suggest an alternative approach,
(a proof that such an n doesn't exist would be perfect!)
but, seriously; someway to faccilitate and accelerate the calculations
to reach values of n higher than 30030.

Gilmar, Sep 9, 2005

2. ### Peter PeinGuest

Gilmar,

if n is even, let i=1. Then Prime=2 and n-Prime is even too.

=> No

Peter Pein, Sep 10, 2005

3. ### GilmarGuest

As Daniel Lichtblau and Peter Pein aptly pointed out:
"Either n-3, n-5, or n-7 will be divisible by 3, hence not prime for
[even] n>10".
Touché! Thank you all for your help!

Gilmar, Sep 10, 2005