2018-09-30 22:01:58 +00:00
---
id: 5900f4b91000cf542c50ffcc
title: 'Problem 333: Special partitions'
2020-11-27 18:02:05 +00:00
challengeType: 5
2019-08-05 16:17:33 +00:00
forumTopicId: 301991
2021-01-13 02:31:00 +00:00
dashedName: problem-333-special-partitions
2018-09-30 22:01:58 +00:00
---
2020-11-27 18:02:05 +00:00
# --description--
2018-09-30 22:01:58 +00:00
All positive integers can be partitioned in such a way that each and every term of the partition can be expressed as 2ix3j, where i,j ≥ 0.
2020-11-27 18:02:05 +00:00
Let's consider only those such partitions where none of the terms can divide any of the other terms. For example, the partition of 17 = 2 + 6 + 9 = (21x30 + 21x31 + 20x32) would not be valid since 2 can divide 6. Neither would the partition 17 = 16 + 1 = (24x30 + 20x30) since 1 can divide 16. The only valid partition of 17 would be 8 + 9 = (23x30 + 20x32).
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
Many integers have more than one valid partition, the first being 11 having the following two partitions. 11 = 2 + 9 = (21x30 + 20x32) 11 = 8 + 3 = (23x30 + 20x31)
2018-09-30 22:01:58 +00:00
Let's define P(n) as the number of valid partitions of n. For example, P(11) = 2.
Let's consider only the prime integers q which would have a single valid partition such as P(17).
2020-11-27 18:02:05 +00:00
The sum of the primes q < 100 such that P(q)=1 equals 233.
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
Find the sum of the primes q < 1000000 such that P(q)=1.
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
# --hints--
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
`euler333()` should return 3053105.
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
```js
assert.strictEqual(euler333(), 3053105);
2018-09-30 22:01:58 +00:00
```
2020-11-27 18:02:05 +00:00
# --seed--
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
## --seed-contents--
2018-09-30 22:01:58 +00:00
```js
function euler333() {
2020-09-15 16:57:40 +00:00
2018-09-30 22:01:58 +00:00
return true;
}
euler333();
```
2020-11-27 18:02:05 +00:00
# --solutions--
2018-09-30 22:01:58 +00:00
```js
// solution required
```