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.
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
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.
Links
- Eric Weisstein's World of Mathematics, Goldbach Partition
- Wikipedia, Goldbach's conjecture
- Index entries for sequences related to Goldbach conjecture
- Index entries for sequences related to partitions
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(p
Charles 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).
Comments