%I #43 Nov 19 2021 15:25:09
%S 0,0,1,2,4,2,1,0,6,0,1,12,1,0,12,0,1,6,1,0,2,0,1,0,0,2,0,0,1,30,1,0,0,
%T 2,0,0,1,0,2,0,1,12,1,0,2,0,1,0,0,2,0,0,4,0,0,2,0,0,1,6,1,0,0,2,0,0,1,
%U 0,2,0,1,2,1,0,0,2,0,0,1,0,6,0,1,0,0,2,0
%N Count the primes appearing in each interval [p,q] where (p,q) is a Goldbach partition of 2n such that all primes from p to q (inclusive) appear as a part in some Goldbach partition of p+q = 2n, and then add the results.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/GoldbachPartition.html">Goldbach Partition</a>
%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Goldbach%27s_conjecture">Goldbach's conjecture</a>
%H <a href="/index/Go#Goldbach">Index entries for sequences related to Goldbach conjecture</a>
%H <a href="/index/Par#part">Index entries for sequences related to partitions</a>
%F a(n) = Sum_{i=3..n} (c(i) * c(2n-i) * (pi(2*n-i)-pi(i-1)) * (Product_{k=i..n} (1-abs(c(k)-c(2n-k)))), where pi is the prime counting function (A000720), and c is the prime characteristic (A010051).
%F From _Wesley Ivan Hurt_, Dec 17 2016: (Start)
%F a(n) = A010051(n)*A278700(n)^2+(1-A010051(n))*A278700(n)*(A278700(n)+1).
%F a(n) <= A279536(n). (End)
%p with(numtheory): A279315:=n->add( (pi(i)-pi(i-1)) * (pi(2*n-i)-pi(2*n-i-1)) * (pi(2*n-i)-pi(i-1)) * (product(1-abs((pi(k)-pi(k-1))-(pi(2*n-k)-pi(2*n-k-1))), k=i..n)), i=3..n): seq(A279315(n), n=1..100);
%t f[n_] := Sum[ Boole[PrimeQ[i]] Boole[PrimeQ[ 2n -i]] (PrimePi[ 2n -i] - PrimePi[i -1]) Product[(1 - Abs[Boole[PrimeQ[k]] - Boole[PrimeQ[ 2n -k]]]), {k, i, n}], {i, 3, n}]; Array[f, 80] (* _Robert G. Wilson v_, Dec 15 2016 *)
%Y Cf. A000720, A010051, A278700, A279481, A279536.
%K nonn,easy
%O 1,4
%A _Wesley Ivan Hurt_, Dec 13 2016