A355306
Number of partitions of n in which the number of prime parts is not equal to the number of nonprime parts.
Original entry on oeis.org
0, 1, 2, 2, 4, 7, 8, 13, 19, 25, 38, 48, 65, 91, 120, 153, 209, 264, 343, 443, 563, 713, 912, 1133, 1428, 1789, 2217, 2746, 3406, 4178, 5139, 6296, 7670, 9344, 11360, 13732, 16612, 20038, 24078, 28915, 34660, 41402, 49439, 58887, 69983, 83088, 98476, 116436, 137589, 162244, 191018
Offset: 0
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.
-
Array[Count[IntegerPartitions[#], ?(#1 - #2 != #2 & @@ {Length[#], Count[#, ?PrimeQ]} &)] &, 51, 0] (* Michael De Vlieger, Jul 15 2022 *)
-
a(n) = my(nb=0); forpart(p=n, if (#select(x->!isprime(x), Vec(p)) != #p/2, nb++)); nb; \\ Michel Marcus, Jun 30 2022
-
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
A355158
Number of partitions of n that contain more nonprime parts than prime parts.
Original entry on oeis.org
0, 1, 1, 1, 3, 4, 5, 8, 12, 16, 24, 29, 42, 57, 74, 97, 132, 165, 217, 279, 355, 453, 576, 717, 908, 1135, 1408, 1751, 2169, 2664, 3283, 4022, 4909, 5990, 7282, 8814, 10681, 12885, 15506, 18643, 22362, 26739, 31970, 38100, 45340, 53878, 63908, 75639, 89476, 105580, 124445
Offset: 0
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.
-
a(n) = my(nb=0); forpart(p=n, if (#select(x->!isprime(x), Vec(p)) > #p/2, nb++)); nb; \\ Michel Marcus, Jun 25 2022
-
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
A355225
Number of partitions of n that contain more prime parts than nonprime parts.
Original entry on oeis.org
0, 0, 1, 1, 1, 3, 3, 5, 7, 9, 14, 19, 23, 34, 46, 56, 77, 99, 126, 164, 208, 260, 336, 416, 520, 654, 809, 995, 1237, 1514, 1856, 2274, 2761, 3354, 4078, 4918, 5931, 7153, 8572, 10272, 12298, 14663, 17469, 20787, 24643, 29210, 34568, 40797, 48113, 56664, 66573
Offset: 0
For n = 8 the partitions of 8 that contain more prime parts than nonprime parts are [5, 3], [3, 3, 2], [4, 2, 2], [2, 2, 2, 2], [5, 2, 1], [3, 2, 2, 1], [2, 2, 2, 1, 1]. There are seven of these partitions so a(8) = 7.
-
a(n) = my(nb=0); forpart(p=n, if (#select(isprime, Vec(p)) > #p/2, nb++)); nb; \\ Michel Marcus, Jun 25 2022
-
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
Showing 1-3 of 3 results.