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.

A278700 Number of Goldbach partitions (p,q) of 2n such that all primes from p to q (inclusive) appear as a part in some Goldbach partition of p+q = 2n.

Original entry on oeis.org

0, 0, 1, 1, 2, 1, 1, 0, 2, 0, 1, 3, 1, 0, 3, 0, 1, 2, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 5, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 3, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 1, 2, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 2, 0, 1, 0, 0, 1, 0, 0, 1
Offset: 1

Views

Author

Wesley Ivan Hurt, Nov 26 2016

Keywords

Comments

Records are a(3) = 1, a(5) = 2, a(12) = 3, a(30) = 5, a(165) = 6, a(8021811) = 7. - Charles R Greathouse IV, Nov 30 2016
a(n) <= A002375(n). - Wesley Ivan Hurt, Dec 17 2016

Examples

			a(5) = 2; There are 2 Goldbach partitions of 2*5 = 10, namely (3,7) and (5,5). (3,7) satisfies the condition that every prime from 3 to 7 (inclusive) appears as a part in some Goldbach partition of 10. This is also true of (5,5) since 5 appears in its own partition.
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Times @@ Map[Boole@ PrimeQ@ # &, {i, 2 n - i}] * Product[(1 - Abs[Subtract @@ Map[Boole@ PrimeQ@ # &, {k, 2 n - k}]]), {k, i, n}], {i, 3, n}], {n, 89}] (* Michael De Vlieger, Nov 30 2016 *)
  • PARI
    a(n) = sum(i=3, n, (ispseudoprime(i) * ispseudoprime(2*n-i) * prod(k=i, n, (1-abs(ispseudoprime(k)-ispseudoprime(2*n-k)))))) \\ Felix Fröhlich, Nov 28 2016
    
  • PARI
    a(n) = if(n<3, return(0)); my(s,p=n,N=2*n); forprime(q=n, N, while(pCharles R Greathouse IV, Nov 30 2016

Formula

a(n) = Sum_{i=3..n} (c(i) * c(2*n-i) * Product_{k=i..n} (1 - abs(c(k) - c(2*n-k)))), where c is the prime characteristic (A010051).