A301776 Prime numbers p with the property that all even numbers n (2 < n <= 2p) are the sum of two primes <= p.
2, 3, 5, 7, 13, 19, 109
Offset: 1
Examples
a(1)=2 because all even numbers 2 < n <= 2*2 (there is just one such number: 4) can be expressed as a sum of 2 only: 4=2+2. a(2)=3 because 4=2+2, 6=3+3. a(3)=5 because 4=2+2, 6=3+3, 8=5+3, 10=5+5. a(4)=7 because 4=2+2, 6=3+3, 8=5+3, 10=5+5, 12=5+7, 14=7+7. a(5)=13 (and is not 11) because 20 cannot be expressed as a sum of two primes from a set {2,3,5,7,11} but all even numbers 2 < n <= 26 can be expressed as a sum of two primes from a set {2,3,5,7,11,13}.
Links
- Marcin Barylski, C++ program
- Marcin Barylski, Sum building from first primes vs. theoretical maximum - the first 200 rounds of the algorithm. If red and green lines ever touch each other, we have a new term.
- Marcin Barylski, Goldbach Strong Conjecture Verification Using Prime Numbers
Crossrefs
Cf. A002372 (number of ordered Goldbach partitions).
Programs
-
Mathematica
Select[Prime@ Range[500], Function[p, SameQ[Select[Union@ Map[Total, Tuples[Prime@ Range@ PrimePi@ p, 2]], And[EvenQ@ #, # > p] &], Range[p + 1 + Boole@ EvenQ@ p, 2 p, 2]]]] (* Michael De Vlieger, Apr 10 2018 *)
-
PARI
isok(p) = {vp = primes(primepi(p)); slist = List(); for (i=1, #vp, for (j=1, i, if (!((vp[i]+vp[j]) % 2), listput(slist, vp[i]+vp[j])););); #Set(slist) == (p-1);} lista(nn) = forprime(p=2, nn, if (isok(p), print1(p, ", "))); \\ Michel Marcus, Apr 09 2018
Comments