Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-87-prime-power-triples.md
Oliver Eyton-Williams ee1e8abd87 feat(curriculum): restore seed + solution to Chinese (#40683)
* feat(tools): add seed/solution restore script

* chore(curriculum): remove empty sections' markers

* chore(curriculum): add seed + solution to Chinese

* chore: remove old formatter

* fix: update getChallenges

parse translated challenges separately, without reference to the source

* chore(curriculum): add dashedName to English

* chore(curriculum): add dashedName to Chinese

* refactor: remove unused challenge property 'name'

* fix: relax dashedName requirement

* fix: stray tag

Remove stray `pre` tag from challenge file.

Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>

Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
2021-01-12 19:31:00 -07:00

54 lines
1.1 KiB
Markdown

---
id: 5900f3c51000cf542c50fed8
title: 'Problem 87: Prime power triples'
challengeType: 5
forumTopicId: 302201
dashedName: problem-87-prime-power-triples
---
# --description--
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?
# --hints--
`primePowerTriples()` should return a number.
```js
assert(typeof primePowerTriples() === 'number');
```
`primePowerTriples()` should return 1097343.
```js
assert.strictEqual(primePowerTriples(), 1097343);
```
# --seed--
## --seed-contents--
```js
function primePowerTriples() {
return true;
}
primePowerTriples();
```
# --solutions--
```js
// solution required
```