2018-09-30 22:01:58 +00:00
|
|
|
---
|
|
|
|
id: 5900f5331000cf542c510045
|
|
|
|
challengeType: 5
|
|
|
|
title: 'Problem 454: Diophantine reciprocals III'
|
|
|
|
---
|
|
|
|
|
|
|
|
## Description
|
|
|
|
<section id='description'>
|
|
|
|
In the following equation x, y, and n are positive integers.
|
|
|
|
|
|
|
|
1x
|
2018-10-08 00:01:53 +00:00
|
|
|
+
|
2018-09-30 22:01:58 +00:00
|
|
|
1y
|
2018-10-08 00:01:53 +00:00
|
|
|
=
|
2018-09-30 22:01:58 +00:00
|
|
|
1n
|
|
|
|
|
|
|
|
For a limit L we define F(L) as the number of solutions which satisfy x < y ≤ L.
|
|
|
|
|
|
|
|
We can verify that F(15) = 4 and F(1000) = 1069.
|
|
|
|
Find F(1012).
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Instructions
|
|
|
|
<section id='instructions'>
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Tests
|
|
|
|
<section id='tests'>
|
|
|
|
|
|
|
|
```yml
|
2018-10-04 13:37:37 +00:00
|
|
|
tests:
|
|
|
|
- text: <code>euler454()</code> should return 5435004633092.
|
2018-10-08 00:01:53 +00:00
|
|
|
testString: 'assert.strictEqual(euler454(), 5435004633092, "<code>euler454()</code> should return 5435004633092.");'
|
2018-09-30 22:01:58 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Challenge Seed
|
|
|
|
<section id='challengeSeed'>
|
|
|
|
|
|
|
|
<div id='js-seed'>
|
|
|
|
|
|
|
|
```js
|
|
|
|
function euler454() {
|
|
|
|
// Good luck!
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
euler454();
|
|
|
|
```
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
## Solution
|
|
|
|
<section id='solution'>
|
|
|
|
|
|
|
|
```js
|
|
|
|
// solution required
|
|
|
|
```
|
|
|
|
</section>
|