OFFSET
0,3
EXAMPLE
For n = 6 the partitions of 6 in which the number of prime parts is not equal to the number of nonprime parts are [6], [3, 3], [2, 2, 2], [3, 2, 1], [4, 1, 1], [3, 1, 1, 1], [2, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], there are eight of these partitions so a(6) = 8.
MATHEMATICA
Array[Count[IntegerPartitions[#], _?(#1 - #2 != #2 & @@ {Length[#], Count[#, _?PrimeQ]} &)] &, 51, 0] (* Michael De Vlieger, Jul 15 2022 *)
PROG
(Python)
from sympy import isprime
from sympy.utilities.iterables import partitions
def c(p): return 2*sum(p[i] for i in p if isprime(i)) != sum(p.values())
def a(n): return sum(1 for p in partitions(n) if c(p))
print([a(n) for n in range(51)]) # Michael S. Branicky, Jun 28 2022
(PARI) a(n) = my(nb=0); forpart(p=n, if (#select(x->!isprime(x), Vec(p)) != #p/2, nb++)); nb; \\ Michel Marcus, Jun 30 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Omar E. Pol, Jun 28 2022
STATUS
approved