2018-09-30 22:01:58 +00:00
---
id: 5900f45c1000cf542c50ff6e
title: 'Problem 239: Twenty-two Foolish Primes'
2020-11-27 18:02:05 +00:00
challengeType: 5
2019-08-05 16:17:33 +00:00
forumTopicId: 301884
2021-01-13 02:31:00 +00:00
dashedName: problem-239-twenty-two-foolish-primes
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
A set of disks numbered 1 through 100 are placed in a line in random order.
2020-11-27 18:02:05 +00:00
What is the probability that we have a partial derangement such that exactly 22 prime number discs are found away from their natural positions? (Any number of non-prime disks may also be found in or out of their natural positions.)
2018-09-30 22:01:58 +00:00
Give your answer rounded to 12 places behind the decimal point in the form 0.abcdefghijkl.
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
`euler239()` should return 0.001887854841.
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
```js
assert.strictEqual(euler239(), 0.001887854841);
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 euler239() {
2020-09-15 16:57:40 +00:00
2018-09-30 22:01:58 +00:00
return true;
}
euler239();
```
2020-11-27 18:02:05 +00:00
# --solutions--
2018-09-30 22:01:58 +00:00
```js
// solution required
```