Cody

# Problem 64. The Goldbach Conjecture, Part 2

Solution 307806

Submitted on 20 Aug 2013 by Nicolae Preda
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))

a = 2 3 4 3

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

a = 2 3 4 5 8 7 6 5

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

a = Columns 1 through 16 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 Columns 17 through 24 18 19 20 21 22 23 24 25 32 31 30 29 28 27 26 25

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

a = Columns 1 through 16 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 478 477 476 475 474 473 472 471 470 469 468 467 466 465 464 463 Columns 17 through 32 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 462 461 460 459 458 457 456 455 454 453 452 451 450 449 448 447 Columns 33 through 48 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 446 445 444 443 442 441 440 439 438 437 436 435 434 433 432 431 Columns 49 through 64 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 430 429 428 427 426 425 424 423 422 421 420 419 418 417 416 415 Columns 65 through 80 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 414 413 412 411 410 409 408 407 406 405 404 403 402 401 400 399 Columns 81 through 96 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 398 397 396 395 394 393 392 391 390 389 388 387 386 385 384 383 Columns 97 through 112 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 382 381 380 379 378 377 376 375 374 373 372 371 370 369 368 367 Columns 113 through 128 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 366 365 364 363 362 361 360 359 358 357 356 355 354 353 352 351 Columns 129 through 144 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 350 349 348 347 346 345 344 343 342 341 340 339 338 337 336 335 Columns 145 through 160 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 334 333 332 331 330 329 328 327 326 325 324 323 322 321 320 319 Columns 161 through 176 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 318 317 316 315 314 313 312 311 310 309 308 307 306 305 304 303 Columns 177 through 192 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 302 301 300 299 298 297 296 295 294 293 292 291 290 289 288 287 Columns 193 through 208 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 286 285 284 283 282 281 280 279 278 277 276 275 274 273 272 271 Columns 209 through 224 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 270 269 268 267 266 265 264 263 262 261 260 259 258 257 256 255 Columns 225 through 239 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 254 253 252 251 250 249 248 247 246 245 244 243 242 241 240