freeCodeCamp/curriculum/challenges/english/08-coding-interview-prep/project-euler/problem-87-prime-power-trip...

1.0 KiB

id challengeType title forumTopicId
5900f3c51000cf542c50fed8 5 Problem 87: Prime power triples 302201

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: 28 = 22 + 23 + 24 33 = 32 + 23 + 24 49 = 52 + 23 + 24 47 = 22 + 33 + 24 How many numbers below fifty million can be expressed as the sum of a prime square, prime cube, and prime fourth power?

Instructions

Tests

tests:
  - text: <code>euler87()</code> should return 1097343.
    testString: assert.strictEqual(euler87(), 1097343);

Challenge Seed

function euler87() {
  // Good luck!
  return true;
}

euler87();

Solution

// solution required