login

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”).

Number of partitions of n into two parts with the smaller part nonprime and the larger part prime.
1

%I #9 Apr 09 2018 22:36:59

%S 0,0,1,1,0,1,0,1,1,0,1,1,1,1,1,0,2,1,2,2,3,1,3,1,3,1,3,1,3,1,3,3,4,1,

%T 4,0,4,3,3,1,4,1,4,3,5,2,5,1,5,2,6,3,6,2,6,4,7,3,6,1,6,5,6,2,7,1,7,6,

%U 7,3,8,3,8,5,8,4,9,2,9,6,9,5,9,2,9,5

%N Number of partitions of n into two parts with the smaller part nonprime and the larger part prime.

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

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

%e a(17) = 2; 17 = 13+4 = 11+6, smaller parts are nonprimes larger are prime.

%t Table[Sum[(PrimePi[n - i] - PrimePi[n - i - 1]) (1 - (PrimePi[i] - PrimePi[i - 1])), {i, Floor[n/2]}], {n, 100}]

%o (PARI) a(n) = sum(i=1, n\2, (1-isprime(i))*isprime(n-i)); \\ _Michel Marcus_, Apr 09 2018

%Y Cf. A010051, A302481.

%K nonn,easy

%O 1,17

%A _Wesley Ivan Hurt_, Apr 08 2018