2018-09-30 22:01:58 +00:00
---
id: 5900f3c51000cf542c50fed8
title: 'Problem 87: Prime power triples'
2020-11-27 18:02:05 +00:00
challengeType: 5
2019-08-05 16:17:33 +00:00
forumTopicId: 302201
2021-01-13 02:31:00 +00:00
dashedName: problem-87-prime-power-triples
2018-09-30 22:01:58 +00:00
---
2020-11-27 18:02:05 +00:00
# --description--
2020-02-28 12:39:47 +00:00
2018-09-30 22:01:58 +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:
2020-02-28 12:39:47 +00:00
< 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 >
2018-09-30 22:01:58 +00:00
How many numbers below fifty million can be expressed as the sum of a prime square, prime cube, and prime fourth power?
2020-02-28 12:39:47 +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
`primePowerTriples()` should return a number.
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
```js
assert(typeof primePowerTriples() === 'number');
```
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
`primePowerTriples()` should return 1097343.
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
```js
assert.strictEqual(primePowerTriples(), 1097343);
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
2020-02-28 12:39:47 +00:00
function primePowerTriples() {
2020-09-15 16:57:40 +00:00
2018-09-30 22:01:58 +00:00
return true;
}
2020-02-28 12:39:47 +00:00
primePowerTriples();
2018-09-30 22:01:58 +00:00
```
2020-11-27 18:02:05 +00:00
# --solutions--
2018-09-30 22:01:58 +00:00
```js
// solution required
```