Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #62 Apr 16 2018 18:59:00
%S 0,2,4,8,4,12,20,16,28,40,32,48,40,34,56,78,68,60,88,80,112,144,132,
%T 168,156,144,184,170,156,202,248,234,220,272,256,310,364,346,328,388,
%U 368,432,412,394,464,444,424,406,484,464,544,624,600,684,768,742,828
%N Sum of the differences of the larger and smaller parts in the partitions of 2n into two parts with the larger part prime.
%C 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
%H <a href="/index/Par#part">Index entries for sequences related to partitions</a>
%F a(n) = 2 * Sum_{i=1..n} (n - i)*A010051(2n - i).
%e 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.
%t Table[2 Sum[(n - i) (PrimePi[2 n - i] - PrimePi[2 n - i - 1]), {i, n}], {n, 60}]
%o (PARI) a(n) = 2*sum(i=1, n, (n-i)*isprime(2*n-i)); \\ _Michel Marcus_, Mar 25 2018
%Y Cf. A010051, A294013.
%K nonn,easy
%O 1,2
%A _Wesley Ivan Hurt_, Oct 21 2017