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.

A294345 Sum of the products of the smaller and larger parts of the Goldbach partitions of n into two distinct parts.

Original entry on oeis.org

0, 0, 0, 0, 6, 0, 10, 15, 14, 21, 0, 35, 22, 33, 26, 94, 0, 142, 34, 142, 38, 142, 0, 357, 46, 202, 0, 302, 0, 591, 58, 334, 62, 491, 0, 980, 0, 217, 74, 821, 0, 1340, 82, 785, 86, 827, 0, 1987, 94, 1512, 0, 1353, 0, 2677, 106, 1421, 0, 1479, 0, 4242, 118
Offset: 1

Views

Author

Wesley Ivan Hurt, Oct 28 2017

Keywords

Comments

Sum of the areas of the distinct rectangles with prime length and width such that L + W = n, W < L. For example, a(14) = 33; the only rectangle is 3 X 11 and 3*11 = 33 (the 7 X 7 rectangle is not considered since we have W < L).

Examples

			a(22) = 142; the Goldbach partitions of 22 are (19,3), (17,5) and (11,11) (we do not consider (11,11) since we only count prime parts which are distinct). Then the sum of the products of the smaller and larger parts from each partition is 19*3 + 17*5 = 142.
		

Crossrefs

Programs

  • Maple
    with(numtheory): A294345:=n->add(i*(n-i)*(pi(i)-pi(i-1))*(pi(n-i)-pi(n-i-1)), i=2..floor((n-1)/2)): seq(A294345(n), n=1..100);
  • Mathematica
    Table[Sum[i (n - i) (PrimePi[i] - PrimePi[i - 1]) (PrimePi[n - i] - PrimePi[n - i - 1]), {i, 2, Floor[(n-1)/2]}], {n, 60}]
    Table[Total[Times@@@Select[IntegerPartitions[n,{2}],AllTrue[#,PrimeQ] && #[[1]]!=#[[2]]&]],{n,70}] (* Harvey P. Dale, Jul 29 2021 *)
  • PARI
    a(n) = sum(i=1, (n-1)\2, i*isprime(i)*(n-i)*isprime(n-i)); \\ Michel Marcus, Nov 08 2017

Formula

a(n) = Sum_{i=2..floor((n-1)/2)} i * (n-i) * c(i) * c(n-i), where c is the prime characteristic (A010051).
a(k) = 0, for k in A166081. - Michel Marcus, Oct 30 2017