OFFSET
1,2
COMMENTS
LINKS
FORMULA
a(n) = Sum_{i=2..n} c(i) * c(2*n-i) * i * (2*n-i), where c = A010051.
a(n) = Sum_{k=(n^2-n+2)/2..(n^2+n-2)/2} c(A105020(k)) * A105020(k), where c = A064911. - Wesley Ivan Hurt, Sep 19 2021
EXAMPLE
a(5) = 46. 2*5 = 10 has two Goldbach partitions: (7,3) and (5,5). Taking the products of the larger and smaller parts of these partitions and adding, we get 7*3 + 5*5 = 46.
MAPLE
with(numtheory); seq(sum( (2*k*i-i^2) * (pi(i)-pi(i-1)) * (pi(2*k-i)-pi(2*k-i-1)), i=2..k), k=1..70);
# Alternative:
f:= proc(n)
local S;
S:= select(t -> isprime(t) and isprime(2*n-t), [seq(i, i=3..n, 2)]);
add(t*(2*n-t), t=S)
end proc:
f(2):= 4:
map(f, [$1..200]); # Robert Israel, Nov 29 2020
MATHEMATICA
c[n_] := Boole[PrimeQ[n]];
a[n_] := Sum[c[i]*c[2n-i]*i*(2n-i), {i, 2, n}];
Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Feb 02 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Aug 25 2013
STATUS
approved