Cody

Problem 64. The Goldbach Conjecture, Part 2

Solution 457945

Submitted on 18 Jun 2014 by Teemu Pulkkinen
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
%% n = 6; c_correct = 1; assert(isequal(goldbach2(n),c_correct))

pairs = [] pairs = 3 3

2   Pass
%% n = 10; c_correct = 2; assert(isequal(goldbach2(n),c_correct))

pairs = [] pairs = 3 7 5 5 7 3

3   Pass
%% n = 50; c_correct = 4; assert(isequal(goldbach2(n),c_correct))

pairs = [] pairs = 3 47 7 43 13 37 19 31 31 19 37 13 43 7 47 3

4   Pass
%% n = 480; c_correct = 29; assert(isequal(goldbach2(n),c_correct))

pairs = [] pairs = 13 467 17 463 19 461 23 457 31 449 37 443 41 439 47 433 59 421 61 419 71 409 79 401 83 397 97 383 101 379 107 373 113 367 127 353 131 349 149 331 163 317 167 313 173 307 197 283 199 281 211 269 223 257 229 251 239 241 241 239 251 229 257 223 269 211 281 199 283 197 307 173 313 167 317 163 331 149 349 131 353 127 367 113 373 107 379 101 383 97 397 83 401 79 409 71 419 61 421 59 433 47 439 41 443 37 449 31 457 23 461 19 463 17 467 13

Suggested Problems

More from this Author95

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!