cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A294022 Sum of the differences of the larger and smaller parts in the partitions of n into two parts with the larger part prime.

This page as a plain text file.
%I A294022 #29 Apr 16 2018 18:59:15
%S A294022 0,0,1,2,1,4,3,8,6,4,3,12,10,20,18,16,14,28,25,40,36,32,29,48,44,40,
%T A294022 37,34,31,56,52,78,73,68,64,60,56,88,84,80,76,112,107,144,138,132,127,
%U A294022 168,162,156,150,144,138,184,177,170,163,156,150,202,195,248
%N A294022 Sum of the differences of the larger and smaller parts in the partitions of n into two parts with the larger part prime.
%C A294022 Sum of the slopes of the tangent lines along the left side of the parabola b(x) = n*x-x^2 such that n-x is prime for x in 0 < x <= floor(n/2). For example, d/dx n*x-x^2 = n-2x. So for a(12), the integer values of x which make 12-x prime are x=1,5 and so a(12) = 12-2*1 + 12-2*5 = 10 + 2 = 12. - _Wesley Ivan Hurt_, Mar 24 2018
%H A294022 Robert G. Wilson v, <a href="/A294022/b294022.txt">Table of n, a(n) for n = 1..1000</a>
%H A294022 <a href="/index/Par#part">Index entries for sequences related to partitions</a>
%F A294022 a(n) = Sum_{i=1..floor(n/2)} (n - 2i) * A010051(n - i).
%e A294022 There are two ways to partition n = 9 into a prime and a smaller positive integer: 7 + 2 and 5 + 4. So a(9) = (7 - 2) + (5 - 4) = 6. - _Michael B. Porter_, Mar 26 2018
%t A294022 Table[Sum[(n - 2 i) (PrimePi[n - i] - PrimePi[n - i - 1]), {i, Floor[n/2]}], {n, 60}]
%o A294022 (PARI) a(n) = sum(i=1, n\2, (n - 2*i)*isprime(n-i)); \\ _Michel Marcus_, Mar 24 2018
%Y A294022 Cf. A010051, A294023.
%K A294022 nonn,easy
%O A294022 1,4
%A A294022 _Wesley Ivan Hurt_, Oct 21 2017