2018-09-30 23:01:58 +01:00
---
id: 5900f4041000cf542c50ff17
title: 'Problem 152: Writing one half as a sum of inverse squares'
2020-11-27 19:02:05 +01:00
challengeType: 5
2019-08-05 09:17:33 -07:00
forumTopicId: 301783
2021-01-13 03:31:00 +01:00
dashedName: problem-152-writing-one-half-as-a-sum-of-inverse-squares
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
2020-11-27 19:02:05 +01:00
There are several ways to write the number 1/2 as a sum of inverse squares using distinct integers.
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
For instance, the numbers {2,3,4,5,7,12,15,20,28,35} can be used:
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
In fact, only using integers between 2 and 45 inclusive, there are exactly three ways to do it, the remaining two being: {2,3,4,6,7,9,10,20,28,35,36,45} and {2,3,4,6,7,9,12,15,28,30,35,36,45}. How many ways are there to write the number 1/2 as a sum of inverse squares using distinct integers between 2 and 80 inclusive?
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
`euler152()` should return 301.
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
```js
assert.strictEqual(euler152(), 301);
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 euler152() {
2020-09-15 09:57:40 -07:00
2018-09-30 23:01:58 +01:00
return true;
}
euler152();
```
2020-11-27 19:02:05 +01:00
# --solutions--
2018-09-30 23:01:58 +01:00
```js
// solution required
```