OFFSET
1,3
COMMENTS
Sum of the slopes of the tangent lines along the left side of the parabola b(x) = 2*n*x-x^2 at prime values of x for x in 0 < x <= n. For example, d/dx 2*n*x-x^2 = 2n-2x. So for a(6), the prime values of x are x=2,3,5 and so a(6) = 12-2*2 + 12-2*3 + 12-2*5 = 8 + 6 + 2 = 16. - Wesley Ivan Hurt, Mar 24 2018
LINKS
FORMULA
a(n) = 2 * Sum_{i=1..n} (n - i) * A010051(i).
EXAMPLE
a(4) = 6: There are two partitions of 2*4 = 8 into two parts with the smaller part prime; they are (6,2) and (5,3). The sum of the differences of the parts is (6 - 2) + (5 - 3) = 4 + 2 = 6.
MATHEMATICA
Table[2 Sum[(n - i) (PrimePi[i] - PrimePi[i - 1]), {i, n}], {n, 40}]
Table[Total[#[[1]]-#[[2]]&/@Select[IntegerPartitions[2n, {2}], PrimeQ[ #[[2]]]&]], {n, 60}] (* Harvey P. Dale, Jan 25 2019 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Oct 21 2017
STATUS
approved