login
Number of nontrivial non-Goldbach partitions of 2n into two odd parts (with smaller part greater than 1).
1

%I #34 Apr 26 2021 06:26:59

%S 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,

%T 10,14,12,11,13,13,12,15,15,12,16,17,13,18,18,16,21,18,17,20,20,18,21,

%U 20,18,22,23,17,26,25,21,28,25,23,27,28,26,27,27,24

%N Number of nontrivial non-Goldbach partitions of 2n into two odd parts (with smaller part greater than 1).

%C Number of partitions of 2n into two odd parts with at least 1 composite part less than 2n-1.

%H Indranil Ghosh, <a href="/A234537/b234537.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Par#part">Index entries for sequences related to partitions</a>

%F a(n) = ceiling(n/2) - 1 - Sum_{i=3..n} A010051(i) * A010051(2n-i).

%e 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).

%t 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}]

%o (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

%o (Python)

%o from sympy import isprime

%o def a(n): return sum(1 for k in range(3, n + 1, 2) if not isprime(k) or not isprime(2*n - k))

%o print([a(n) for n in range(1, 101)]) # _Indranil Ghosh_, Jul 11 2017

%Y Cf. A002375, A141100.

%K nonn,nice

%O 1,9

%A _Wesley Ivan Hurt_, Dec 27 2013