2018-10-10 18:03:03 -04:00
---
id: 5900f3c51000cf542c50fed8
2021-02-06 04:42:36 +00:00
title: 'Problem 87: Prime power triples'
2018-10-10 18:03:03 -04:00
challengeType: 5
2021-02-06 04:42:36 +00:00
forumTopicId: 302201
2021-01-13 03:31:00 +01:00
dashedName: problem-87-prime-power-triples
2018-10-10 18:03:03 -04:00
---
2020-12-16 00:37:30 -07:00
# --description--
2018-10-10 18:03:03 -04:00
2021-02-06 04:42:36 +00:00
The smallest number expressible as the sum of a prime square, prime cube, and prime fourth power is 28. In fact, there are exactly four numbers below fifty that can be expressed in such a way:
<div style='margin-left: 4em;'>
28 = 2<sup>2</sup> + 2<sup>3</sup> + 2<sup>4</sup><br>
33 = 3<sup>2</sup> + 2<sup>3</sup> + 2<sup>4</sup><br>
49 = 5<sup>2</sup> + 2<sup>3</sup> + 2<sup>4</sup><br>
47 = 2<sup>2</sup> + 3<sup>3</sup> + 2<sup>4</sup>
</div>
How many numbers below fifty million can be expressed as the sum of a prime square, prime cube, and prime fourth power?
2018-10-10 18:03:03 -04:00
2020-12-16 00:37:30 -07:00
# --hints--
2018-10-10 18:03:03 -04:00
2021-02-06 04:42:36 +00:00
`primePowerTriples()` should return a number.
```js
assert(typeof primePowerTriples() === 'number');
```
`primePowerTriples()` should return 1097343.
2018-10-10 18:03:03 -04:00
```js
2021-02-06 04:42:36 +00:00
assert.strictEqual(primePowerTriples(), 1097343);
2018-10-10 18:03:03 -04:00
```
2021-01-13 03:31:00 +01:00
# --seed--
## --seed-contents--
```js
function primePowerTriples() {
return true;
}
primePowerTriples();
```
2020-12-16 00:37:30 -07:00
# --solutions--
2020-08-13 17:24:35 +02:00
2021-01-13 03:31:00 +01:00
```js
// solution required
```