project_euler.problem_087.sol1

Project Euler Problem 87: https://projecteuler.net/problem=87

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?

Functions

solution(→ int)

Return the number of integers less than limit which can be expressed as the sum

Module Contents

project_euler.problem_087.sol1.solution(limit: int = 50000000) int

Return the number of integers less than limit which can be expressed as the sum of a prime square, prime cube, and prime fourth power. >>> solution(50) 4