Problem 54700. Leyland Primes
Solution Stats
Problem Comments
-
4 Comments
24^5+25^12 in test case 6 is greater than 2^53 and therefore cannot be tested using ordinary double precision numbers.
Tim, William, Chris -
The faulty test case has been edited out of the test suite. Apologies for the inconvenience. Please attempt/edit your answer accordingly.
Dyuman, it looks like Test 6 is still being applied.
I thought commenting it out would work, but it didn't. I have removed it completely and rescored the solutions, good to go.
Do rate the problem!
Solution Comments
-
3 Comments
ismember() is not allowed now!
I expected that! But I really couldn't see why one would write a complicated program when there are just a handful of well-known values.
Dyuman,
I have written a proper solution now, and it works on everything except Test 6. As Tim has pointed out, the argument in that case is larger than flintmax. isprime() evaluates to zero.
Problem Recent Solvers5
Suggested Problems
-
293 Solvers
-
1091 Solvers
-
229 Solvers
-
Diophantine Equations (Inspired by Project Euler, problem 66)
46 Solvers
-
10151 Solvers
More from this Author27
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!