# Splitting the Primes

Is it possible to split the 25 primes less than 100 into two disjoint sets such that the sum of the primes in one set equals the product of the primes in the other set?

If so, in how many ways can this be done?

• This looks like it might be more to do with maths, partitioning and set theory than puzzling, so I’ve flagged it as being off-topic. Sep 23, 2021 at 15:26

A first observation is that the sum of all given primes is 1060 and the primorial $$\#11$$ is $$2×3×5×7×11=2310$$, so there may be at most four primes in the product set. Futhermore if there are two or four primes in the product set, either 2 is in there, the product is even but the sum is odd (of 23 or 21 odd primes), or it isn't, the product is odd but the sum is even (2 + 22 or 20 odd primes), which is a contradiction either way. Clearly there cannot be one in the product set, so there can only be three.

This leaves just 130 cases, and none of them satisfy the given condition. The closest is when the product set has 5, 7, 29 with product 1015, when the sum set then sums to 1019.

• Ah, well done, almost identical argument but before me. Sep 23, 2021 at 15:33
• Great! I have not been able to find an N such that the primes not greater than N can be so split. I am almost certain there are many such N. Sep 23, 2021 at 15:40
• @BernardoRecamánSantos How about N=6? (2+3=5) Sep 23, 2021 at 15:48
• @BernardoRecamánSantos Other examples: 3+7=2*5, also 3+5+7+11=2*13 Sep 23, 2021 at 16:24
• @BernardoRecamánSantos Another example: $2\cdot5\cdot11\cdot19=3+7+13+17+23+29+31+37+41+43+47+53+59+61+67+71+73+79+83+89+97+101+103+107+109+113+127+131+137+139$ Sep 23, 2021 at 23:50

A quick calculation first

Notice that the product of the smallest five primes is $$2 \times 3 \times 5 \times 7 \times 11 = 2310$$.
The sum of the first $$100$$ integers is $$\frac{100 \times 101}{2} = 5050$$ so the sum of the odd integers less than $$100$$ is less than $$2525$$. Notice that $$99$$, $$95$$ and $$93$$ are not there so the sum of the remaining primes is smaller than $$2310$$.
Hence, the product set has at most four elements.

Parity argument

Suppose the size of the product set is even and the size of the sum set is odd.
If the product set contains $$2$$, then its product is even but the sum of the elements of the sum set will be odd.
If the sum set contains $$2$$ then its sum will be even but the product of the product set will be odd.
Hence, the product set cannot contain an even number of elements and so must contain three elements.

Slightly more detail

The sum of the primes greater than $$5$$ and less than $$100$$ is $$1050$$ while the sum of the primes less than $$83$$ is $$791$$ so this means that the product set must contain elements whose product is between these two values.
There are just $$32$$ such cases of prime triplets in this range and we can check by hand that none of these satisfies as a solution to the problem.
The closest we get here is $$5 \times 7 \times 29$$ which is $$1015$$ while the sum of the other primes is $$1019$$.