2018-09-30 22:01:58 +00:00
---
id: 5900f3db1000cf542c50feed
title: 'Problem 110: Diophantine Reciprocals II'
2020-11-27 18:02:05 +00:00
challengeType: 5
2019-08-05 16:17:33 +00:00
forumTopicId: 301735
2021-01-13 02:31:00 +00:00
dashedName: problem-110-diophantine-reciprocals-ii
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
In the following equation x, y, and n are positive integers.
2021-06-30 12:25:46 +00:00
$$\frac{1}{x} + \frac{1}{y} = \frac{1}{n}$$
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
It can be verified that when `n` = 1260 there are 113 distinct solutions and this is the least value of `n` for which the total number of distinct solutions exceeds one hundred.
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
What is the least value of `n` for which the number of distinct solutions exceeds four million?
2018-09-30 22:01:58 +00:00
2021-06-30 12:25:46 +00:00
**Note:** This problem is a much more difficult version of Problem 108 and as it is well beyond the limitations of a brute force approach it requires a clever implementation.
2020-11-27 18:02:05 +00:00
# --hints--
2018-09-30 22:01:58 +00:00
2021-06-30 12:25:46 +00:00
`diophantineTwo()` should return `9350130049860600` .
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
```js
assert.strictEqual(diophantineTwo(), 9350130049860600);
```
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 diophantineTwo() {
2020-09-15 16:57:40 +00:00
2018-09-30 22:01:58 +00:00
return true;
}
diophantineTwo();
```
2020-11-27 18:02:05 +00:00
# --solutions--
2018-09-30 22:01:58 +00:00
```js
// solution required
```