A234537 Number of nontrivial non-Goldbach partitions of 2n into two odd parts (with smaller part greater than 1).
0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 4, 4, 5, 4, 4, 7, 6, 6, 7, 7, 6, 8, 9, 8, 10, 10, 8, 12, 10, 10, 14, 12, 11, 13, 13, 12, 15, 15, 12, 16, 17, 13, 18, 18, 16, 21, 18, 17, 20, 20, 18, 21, 20, 18, 22, 23, 17, 26, 25, 21, 28, 25, 23, 27, 28, 26, 27, 27, 24
Offset: 1
Examples
a(15) = 4; there are exactly 4 partitions of 2*15 = 30 into two odd parts with at least one composite part less than 2*15 - 1 = 29: (27,3), (25,5), (21,9), (15,15).
Links
Programs
-
Mathematica
Table[Ceiling[n/2] - 1 - Sum[(PrimePi[i] - PrimePi[i - 1])*(PrimePi[2 n - i] - PrimePi[2 n - i - 1]), {i, 3, n}], {n, 100}]
-
PARI
a(n)=my(s); forstep(k=3,n,2, if(!isprime(k) || !isprime(2*n-k), s++)); s \\ Charles R Greathouse IV, Jul 30 2016
-
Python
from sympy import isprime def a(n): return sum(1 for k in range(3, n + 1, 2) if not isprime(k) or not isprime(2*n - k)) print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jul 11 2017
Comments