A279730 Partial sums of A279729.
0, 0, 6, 14, 34, 46, 60, 60, 96, 96, 118, 190, 216, 216, 306, 306, 340, 412, 450, 450, 492, 492, 538, 538, 538, 590, 590, 590, 648, 948, 1010, 1010, 1010, 1078, 1078, 1078, 1152, 1152, 1230, 1230, 1312, 1564, 1650, 1650, 1740, 1740, 1834, 1834, 1834, 1934
Offset: 1
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
-
Maple
with(numtheory): A279730:=n->2*add(add(j * (pi(i)-pi(i-1)) * (pi(2*j-i)-pi(2*j-i-1)) * (product(1-abs((pi(k)-pi(k-1))-(pi(2*j-k)-pi(2*j-k-1))), k=i..j)), i=3..j), j=1..n): seq(A279730(n), n=1..40);
-
Mathematica
f[n_, x_: 0] := Sum[(If[x == 0, i, 2 n - i] Boole[PrimeQ@ i] Boole[PrimeQ[2 n - i]]) Product[1 - Abs[Boole[PrimeQ@ k] - Boole[PrimeQ[2 n - k]]], {k, i, n}], {i, 3, n}]; Accumulate@ Table[f@ n + f[n, 1], {n, 50}] (* Michael De Vlieger, Dec 18 2016 *)