Problem 44793. Project Euler 249: Prime Subset Sums
Inspired by Problem 249 of Project Euler. https://projecteuler.net/problem=249
Let S = {2, 3, 5, ...} be the set of prime numbers less than N.
Find the number of subsets of S, the sum of whose elements is a prime number. Enter the rightmost 16 digits as your answer. The answer must be a uint64 integer.
Solution Stats
Problem Comments
-
2 Comments
Rafael S.T. Vieira
on 11 Aug 2020
The tip for this one is that It is possible to solve it within MATLAB's precision by using mod(x,10^16). No need for Java or Python (arbitrary-precision arithmetic).
GeeTwo
on 9 Jan 2023
At least those four lookup solutions inspired me to squeeze a bit harder to get down to 61.
Solution Comments
Show commentsGroup

Project Euler IV
- 11 Problems
- 16 Finishers
- Bouncy numbers
- Generalised Hamming Number
- Project Euler 249: Prime Subset Sums
- Pseudo Square Root (Inspired by Project Euler 266)
- Golomb's self-describing sequence (based on Euler 341)
- Pandigital Factors (Based on Euler 491)
- Pandigital Multiples of 11 (based on Project Euler 491)
- It's going down. We're finding simbers!
- Odd elimination
- Decimation
- Day counter function
Problem Recent Solvers18
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!