OFFSET
1,6
LINKS
FORMULA
EXAMPLE
n = 22 has floor(n/2) = 11 partitions of form n = a + b; 3 partitions are of prime + prime [3 + 19 = 5 + 17 = 11 + 11], 3 partitions are of prime + nonprime [2 + 20 = 7 + 15 = 13 + 9], 5 partitions are nonprime + nonprime [1 + 21 = 4 + 18 = 6 + 16 = 8 + 14 = 10 + 12]. So a(22) = 3.
MATHEMATICA
Table[Length[Select[Range[Floor[n/2]], (PrimeQ[#] && Not[PrimeQ[n - #]]) || (Not[PrimeQ[#]] && PrimeQ[n - #]) &]], {n, 80}] (* Alonso del Arte, Apr 21 2013 *)
Table[Length[Select[IntegerPartitions[n, {2}], AnyTrue[#, PrimeQ] && !AllTrue[ #, PrimeQ]&]], {n, 90}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 19 2020 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Labos Elemer, Jul 04 2001
STATUS
approved