Cody

# Problem 64. The Goldbach Conjecture, Part 2

Solution 31679

Submitted on 6 Feb 2012 by Jean-Yves Tinevez
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))

p = 2 3 5 d = 4 3 1 c = 1

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

p = 2 3 5 7 d = 8 7 5 3 c = 2

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

p = Columns 1 through 10 2 3 5 7 11 13 17 19 23 29 Columns 11 through 15 31 37 41 43 47 d = Columns 1 through 10 48 47 45 43 39 37 33 31 27 21 Columns 11 through 15 19 13 9 7 3 c = 4

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

p = Columns 1 through 10 2 3 5 7 11 13 17 19 23 29 Columns 11 through 20 31 37 41 43 47 53 59 61 67 71 Columns 21 through 30 73 79 83 89 97 101 103 107 109 113 Columns 31 through 40 127 131 137 139 149 151 157 163 167 173 Columns 41 through 50 179 181 191 193 197 199 211 223 227 229 Columns 51 through 60 233 239 241 251 257 263 269 271 277 281 Columns 61 through 70 283 293 307 311 313 317 331 337 347 349 Columns 71 through 80 353 359 367 373 379 383 389 397 401 409 Columns 81 through 90 419 421 431 433 439 443 449 457 461 463 Columns 91 through 92 467 479 d = Columns 1 through 10 478 477 475 473 469 467 463 461 457 451 Columns 11 through 20 449 443 439 437 433 427 421 419 413 409 Columns 21 through 30 407 401 397 391 383 379 377 373 371 367 Columns 31 through 40 353 349 343 341 331 329 323 317 313 307 Columns 41 through 50 301 299 289 287 283 281 269 257 253 251 Columns 51 through 60 247 241 239 229 223 217 211 209 203 199 Columns 61 through 70 197 187 173 169 167 163 149 143 133 131 Columns 71 through 80 127 121 113 107 101 97 91 83 79 71 Columns 81 through 90 61 59 49 47 41 37 31 23 19 17 Columns 91 through 92 13 1 c = 29