OFFSET
0,5
EXAMPLE
For n = 8 the partitions of 8 that contain more nonprime parts than prime parts are [8], [4, 4], [4, 3, 1], [6, 1, 1], [4, 2, 1, 1], [5, 1, 1, 1], [3, 2, 1, 1, 1], [4, 1, 1, 1, 1], [2, 2, 1, 1, 1, 1], [3, 1, 1, 1, 1, 1], [2, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1]. There are 12 of these partitions so a(8) = 12.
PROG
(PARI) a(n) = my(nb=0); forpart(p=n, if (#select(x->!isprime(x), Vec(p)) > #p/2, nb++)); nb; \\ Michel Marcus, Jun 25 2022
(Python)
from sympy import isprime
from sympy.utilities.iterables import partitions
def c(p): return 2*sum(p[i] for i in p if not 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
CROSSREFS
KEYWORD
nonn
AUTHOR
Omar E. Pol, Jun 24 2022
EXTENSIONS
More terms from Michel Marcus, Jun 25 2022
STATUS
approved