2018-09-30 22:01:58 +00:00
---
id: 5900f3f31000cf542c50ff06
title: 'Problem 135: Same differences'
2020-11-27 18:02:05 +00:00
challengeType: 5
2019-08-05 16:17:33 +00:00
forumTopicId: 301763
2021-01-13 02:31:00 +00:00
dashedName: problem-135-same-differences
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
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 18:02:05 +00:00
2018-09-30 22:01:58 +00:00
342 − 272 − 202 = 122 − 92 − 62 = 27
2020-11-27 18:02:05 +00:00
It turns out that n = 1155 is the least value which has exactly ten solutions.
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
How many values of n less than one million have exactly ten distinct solutions?
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
# --hints--
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
`euler135()` should return 4989.
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
```js
assert.strictEqual(euler135(), 4989);
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 euler135() {
2020-09-15 16:57:40 +00:00
2018-09-30 22:01:58 +00:00
return true;
}
euler135();
```
2020-11-27 18:02:05 +00:00
# --solutions--
2018-09-30 22:01:58 +00:00
```js
// solution required
```