47 lines
817 B
Markdown
47 lines
817 B
Markdown
![]() |
---
|
||
|
id: 5900f5331000cf542c510045
|
||
|
title: 'Problem 454: Diophantine reciprocals III'
|
||
|
challengeType: 5
|
||
|
forumTopicId: 302127
|
||
|
dashedName: problem-454-diophantine-reciprocals-iii
|
||
|
---
|
||
|
|
||
|
# --description--
|
||
|
|
||
|
In the following equation $x$, $y$, and $n$ are positive integers.
|
||
|
|
||
|
$$\frac{1}{x} + \frac{1}{y} = \frac{1}{n}$$
|
||
|
|
||
|
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({10}^{12})$.
|
||
|
|
||
|
# --hints--
|
||
|
|
||
|
`diophantineReciprocalsThree()` should return `5435004633092`.
|
||
|
|
||
|
```js
|
||
|
assert.strictEqual(diophantineReciprocalsThree(), 5435004633092);
|
||
|
```
|
||
|
|
||
|
# --seed--
|
||
|
|
||
|
## --seed-contents--
|
||
|
|
||
|
```js
|
||
|
function diophantineReciprocalsThree() {
|
||
|
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
diophantineReciprocalsThree();
|
||
|
```
|
||
|
|
||
|
# --solutions--
|
||
|
|
||
|
```js
|
||
|
// solution required
|
||
|
```
|