2018-09-30 23:01:58 +01:00
---
id: 5900f3f51000cf542c50ff07
title: 'Problem 136: Singleton difference'
2020-11-27 19:02:05 +01:00
challengeType: 5
2019-08-05 09:17:33 -07:00
forumTopicId: 301764
2021-01-13 03:31:00 +01:00
dashedName: problem-136-singleton-difference
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
The positive integers, x, y, and z, are consecutive terms of an arithmetic progression. Given that n is a positive integer, the equation, x2 − y2 − z2 = n, has exactly one solution when n = 20:
2020-11-27 19:02:05 +01:00
2018-09-30 23:01:58 +01:00
132 − 102 − 72 = 20
2020-11-27 19:02:05 +01:00
In fact there are twenty-five values of n below one hundred for which the equation has a unique solution.
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
How many values of n less than fifty million have exactly one solution?
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
2020-11-27 19:02:05 +01:00
`euler136()` should return 2544559.
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
```js
assert.strictEqual(euler136(), 2544559);
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
function euler136() {
2020-09-15 09:57:40 -07:00
2018-09-30 23:01:58 +01:00
return true;
}
euler136();
```
2020-11-27 19:02:05 +01:00
# --solutions--
2018-09-30 23:01:58 +01:00
```js
// solution required
```