OFFSET
1,5
FORMULA
a(n) = n * Sum_{i=1..floor((n-1)/2)} (n-i) * (n-2*i) * c(i) * c(n-i), where c is the prime characteristic (A010051).
MATHEMATICA
Table[n*Sum[(n - i) (n - 2 i) (PrimePi[i] - PrimePi[i - 1]) (PrimePi[n - i] - PrimePi[n - i - 1]), {i, Floor[(n - 1)/2]}], {n, 80}]
PROG
(PARI) a(n) = n*sum(i=1, (n-1)\2, (n-i)*(n-2*i)*isprime(i)*isprime(n-i)); \\ Michel Marcus, Apr 21 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Apr 20 2018
STATUS
approved