Problem 51077. List composite numbers that cannot be written as the sum of two primes
Solution Stats
Problem Comments
-
4 Comments
Oh, and BTW, the example of the number 35, which is given in the problem description, does not appear in the list for the solution of the first problem.
William, I don't consider 1 as a prime or composite number, and I've added that note to the problem. Also, rather than list all of the numbers, the test suite checks some of them. For example, the first problem has y(1:2:end), and the second has y(2:2:end). I haven't looked at your solutions, but I suspect the problem is including 1; there are nine numbers less than or equal to 100, not ten.
Thanks. I missed the fact that you were only checking alternate values. It's a clever problem!
Solution Comments
Show commentsProblem Recent Solvers11
Suggested Problems
-
Find the longest sequence of 1's in a binary sequence.
6346 Solvers
-
Remove the small words from a list of words.
1526 Solvers
-
347 Solvers
-
Duplicate each element of a vector.
614 Solvers
-
185 Solvers
More from this Author291
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!