2018-09-30 23:01:58 +01:00
---
id: 5900f4601000cf542c50ff73
title: 'Problem 243: Resilience'
2020-11-27 19:02:05 +01:00
challengeType: 5
2019-08-05 09:17:33 -07:00
forumTopicId: 301890
2021-01-13 03:31:00 +01:00
dashedName: problem-243-resilience
2018-09-30 23:01:58 +01:00
---
2020-11-27 19:02:05 +01:00
# --description--
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
A positive fraction whose numerator is less than its denominator is called a proper fraction.
2018-09-30 23:01:58 +01:00
2021-07-16 12:21:45 +02:00
For any denominator, $d$, there will be $d− 1$ proper fractions; for example, with $d = 12$:
2018-09-30 23:01:58 +01:00
2021-07-16 12:21:45 +02:00
$$\frac{1}{12}, \frac{2}{12}, \frac{3}{12}, \frac{4}{12}, \frac{5}{12}, \frac{6}{12}, \frac{7}{12}, \frac{8}{12}, \frac{9}{12}, \frac{10}{12}, \frac{11}{12}$$
2018-09-30 23:01:58 +01:00
2021-07-16 12:21:45 +02:00
We shall call a fraction that cannot be cancelled down a resilient fraction.
Furthermore we shall define the resilience of a denominator, $R(d)$, to be the ratio of its proper fractions that are resilient; for example, $R(12) = \frac{4}{11}$.
In fact, $d = 12$ is the smallest denominator having a resilience $R(d) < \frac{4}{10}$.
Find the smallest denominator $d$, having a resilience $R(d) < \frac{15\\,499}{94\\,744}$.
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
# --hints--
2018-09-30 23:01:58 +01:00
2021-07-16 12:21:45 +02:00
`resilience()` should return `892371480` .
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
```js
2021-07-16 12:21:45 +02:00
assert.strictEqual(resilience(), 892371480);
2018-09-30 23:01:58 +01:00
```
2020-11-27 19:02:05 +01:00
# --seed--
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
## --seed-contents--
2018-09-30 23:01:58 +01:00
```js
2021-07-16 12:21:45 +02:00
function resilience() {
2020-09-15 09:57:40 -07:00
2018-09-30 23:01:58 +01:00
return true;
}
2021-07-16 12:21:45 +02:00
resilience();
2018-09-30 23:01:58 +01:00
```
2020-11-27 19:02:05 +01:00
# --solutions--
2018-09-30 23:01:58 +01:00
```js
// solution required
```