OFFSET
1,2
COMMENTS
Sum of the slopes of the tangent lines along the left side of the parabola b(x) = 2*n*x-x^2 such that 2n-x is prime for integer values of x in 0 < x <= n. For example, d/dx 2*n*x-x^2 = 2n-2x. So for a(8), the integer values of x which make 16-x prime are x=3,5 and so a(8) = 16-2*3 + 16-2*5 = 10 + 6 = 16. - Wesley Ivan Hurt, Mar 24 2018
FORMULA
a(n) = 2 * Sum_{i=1..n} (n - i)*A010051(2n - i).
EXAMPLE
a(4) = 8; there are two partitions of 2*4 = 8 into two parts with the larger part prime: (7,1) and (5,3). The sum of the differences of the parts is (7 - 1) + (5 - 3) = 6 + 2 = 8.
MATHEMATICA
Table[2 Sum[(n - i) (PrimePi[2 n - i] - PrimePi[2 n - i - 1]), {i, n}], {n, 60}]
PROG
(PARI) a(n) = 2*sum(i=1, n, (n-i)*isprime(2*n-i)); \\ Michel Marcus, Mar 25 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Oct 21 2017
STATUS
approved