OFFSET
1,4
LINKS
Eric Weisstein's World of Mathematics, Goldbach Partition
Wikipedia, Goldbach's conjecture
FORMULA
a(n) = 2*n * Sum_{i=1..n} (n-i) * c(i) * c(2*n-i), where c is the prime characteristic (A010051).
EXAMPLE
a(4) = 8; 2*4 = 8 has one Goldbach partition: (5,3). The area of the triangle is (5 + 3)*(5 - 3)/2 = 8.
a(8) = 128; 2*8 = 16 has the two Goldbach partitions: (13,3) and (11,5). The total area of the two triangles is (13 + 3)*(13 - 3)/2 + (11 + 5)*(11 - 5)/2 = 80 + 48 = 128.
MATHEMATICA
Table[2 n*Sum[(n - i) (PrimePi[i] - PrimePi[i - 1]) (PrimePi[2 n - i] - PrimePi[2 n - i - 1]), {i, n}], {n, 80}]
PROG
(PARI) a(n) = my(s=0); forprime(p=1, n, if (isprime(2*n-p), s+=n-p)); 2*n*s; \\ Michel Marcus, Apr 14 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Apr 13 2020
STATUS
approved