OFFSET
2,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 2..1000
FORMULA
a(n) = Sum_{i=1..n} (2*n-i) * c(i) * c(2*n-i), where c = A010051. - Wesley Ivan Hurt, Apr 29 2021
a(n) = sopf(A362640(n)), n>=2. - Wesley Ivan Hurt, Apr 28 2023
EXAMPLE
2*5 = 10 can be expressed as the sum of two primes in two ways: 3+7 and 5+5, so a(5) = 7+5 = 12.
MAPLE
with(numtheory); a:=n-> sum( (2*n-i)*( ((pi(i) - pi(i-1)) * (pi(2*n-i) - pi(2*n-i-1))) ), i = 1..n ); seq(a(k), k=1..100); # Wesley Ivan Hurt, Jan 20 2013
MATHEMATICA
Table[Total[Select[IntegerPartitions[2*n, {2}], AllTrue[#, PrimeQ]&][[All, 1]]], {n, 2, 100}] (* Harvey P. Dale, Aug 09 2020 *)
PROG
(PARI) a(n) = my(s=0); forprime(p=1, n, if (isprime(2*n-p), s += 2*n-p)); s; \\ Michel Marcus, Apr 29 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Mar 11 2011
STATUS
approved