2018-09-30 23:01:58 +01:00
---
id: 5900f3f31000cf542c50ff06
title: 'Problem 135: Same differences'
2020-11-27 19:02:05 +01:00
challengeType: 5
2019-08-05 09:17:33 -07:00
forumTopicId: 301763
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
Given the positive integers, x, y, and z, are consecutive terms of an arithmetic progression, the least value of the positive integer, n, for which the equation, x2 − y2 − z2 = n, has exactly two solutions is n = 27:
2020-11-27 19:02:05 +01:00
2018-09-30 23:01:58 +01:00
342 − 272 − 202 = 122 − 92 − 62 = 27
2020-11-27 19:02:05 +01:00
It turns out that n = 1155 is the least value which has exactly ten solutions.
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
How many values of n less than one million have exactly ten distinct solutions?
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
`euler135()` should return 4989.
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
```js
assert.strictEqual(euler135(), 4989);
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 euler135() {
2020-09-15 09:57:40 -07:00
2018-09-30 23:01:58 +01:00
return true;
}
euler135();
```
2020-11-27 19:02:05 +01:00
# --solutions--
2018-09-30 23:01:58 +01:00
```js
// solution required
```