cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A301776 Prime numbers p with the property that all even numbers n (2 < n <= 2p) are the sum of two primes <= p.

Original entry on oeis.org

2, 3, 5, 7, 13, 19, 109
Offset: 1

Views

Author

Marcin Barylski, Mar 26 2018

Keywords

Comments

Conjecture: this sequence is finite - it has 7 terms only. Conjecture verified up to first 10^5 primes.
This sequence is related to the Goldbach Strong Conjecture.

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}.
		

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