Cody

# Problem 1096. Largest Twin Primes

Solution 1908496

Submitted on 22 Aug 2019 by Virtual AS
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
x = 1001; y_correct = [881 883]; assert(isequal(your_fcn_name(x),y_correct))

v = Columns 1 through 30 1 2 3 5 7 13 19 31 43 61 73 103 109 139 151 181 193 199 229 241 271 283 313 349 421 433 463 523 571 601 Columns 31 through 38 619 643 661 811 823 829 859 883 y = 881 883

2   Pass
x = 1964; y_correct = [1949 1951]; assert(isequal(your_fcn_name(x),y_correct))

v = Columns 1 through 15 1 2 3 5 7 13 19 31 43 61 73 103 109 139 151 Columns 16 through 30 181 193 199 229 241 271 283 313 349 421 433 463 523 571 601 Columns 31 through 45 619 643 661 811 823 829 859 883 1021 1033 1051 1063 1093 1153 1231 Columns 46 through 60 1279 1291 1303 1321 1429 1453 1483 1489 1609 1621 1669 1699 1723 1789 1873 Columns 61 through 63 1879 1933 1951 y = 1949 1951

3   Pass
x = 123456789; y_correct = [123456209 123456211]; assert(isequal(your_fcn_name(x),y_correct))

v = Columns 1 through 15 1 2 3 5 7 13 19 31 43 61 73 103 109 139 151 Columns 16 through 30 181 193 199 229 241 271 283 313 349 421 433 463 523 571 601 Columns 31 through 45 619 643 661 811 823 829 859 883 1021 1033 1051 1063 1093 1153 1231 Columns 46 through 60 1279 1291 1303 1321 1429 1453 1483 1489 1609 1621 1669 1699 1723 1789 1873 Columns 61 through 75 1879 1933 1951 1999 2029 2083 2089 2113 2131 2143 2239 2269 2311 2341 2383 Columns 76 through 90 2551 2593 2659 2689 2713 2731 2791 2803 2971 3001 3121 3169 3253 3259 3301 Columns 91 through 105 3331 3361 3373 3391 3463 3469 3529 3541 3559 3583 3673 3769 3823 3853 3919 Columns 106 through 120 3931 4003 4021 4051 4093 4129 4159 4219 4231 4243 4261 4273 4339 4423 4483 Columns 121 through 135 4519 4549 4639 4651 4723 4789 4801 4933 4969 5011 5023 5101 5233 5281 5419 Columns 136 through 150 5443 5479 5503 5521 5641 5653 5659 5743 5851 5869 5881 6091 6133 6199 6271 Columns 151 through 165 6301 6361 6451 6553 6571 6661 6691 6703 6763 6781 6793 6829 6871 6949 6961 Columns 166 through 180 7129 7213 7309 7333 7351 7459 7489 7549 7561 7591 7759 7879 7951 8011 8089 Columns 181 through 195 8221 8233 8293 8389 8431 8539 8599 8629 8821 8839 8863 8971 9001 9013 9043 Columns 196 through 210 9241 9283 9343 9421 9433 9439 9463 9631 9679 9721 9769 9859 9931 10009 10039 Columns 211 through 225 10069 10093 10141 10273 10303 10333 10429 10459 10501 10531 10711 10861 10891 10939 11059 Columns 226 through 240 11071 11119 11161 11173 11353 11491 11551 11701 11719 11779 11833 11941 11971 12043 12073 Columns 241 through 255 12109 12163 12241 12253 12379 12541 12613 12823 12919 13003 13009 13219 13339 13399 13681 Columns 256 through 270 13693 13711 13723 13759 13831 13879 13903 13933 13999 14011 14083 14251 14323 14389 14449 Columns 271 through 285 14551 14563 14593 14629 14869 15139 15271 15289 15331 15361 15583 15643 15649 15733 15739 Columns 286 through 300 15889 15973 16063 16069 16141 16189 16231 16363 16453 16633 16651 16693 16831 16903 16981 Columns 301 through 315 17029 17191 17209 17293 17389 17419 17491 17581 17599 17659 17683 17749 17791 17839 17911 Columns 316 through 330 17923 17959 17989 18043 18049 18061 18121 18133 18253 18289 18313 18523 18541 18913 18919 Columns 331 through 345 19081 19141 19183 19213 19381 19423 19429 19471 19543 19699 19753 19843 19891 19963 19993 Columns 346 through 360 20023 20149 20233 20359 20443 20479 20509 20551 20641 20719 20749 20773 20809 20899 20983 Columns 361 through 375 21013 21019 21061 21193 21319 21379 21493 21523 21559 21589 21601 21613 21649 21739 21841 Columns 376 through 390 22039 22093 22111 22159 22273 22279 22369 22483 22543 22573 22621 22639 22699 22741 22861 Columns 391 through 405 22963 23029 23041 23059 23203 23293 23371 23539 23563 23629 23671 23689 23743 23833 23911 Columns 406 through 420 24109 24181 24373 24421 24919 24979 25033 25171 25303 25309 25411 25471 25579 25603 25801 Columns 421 through 435 25849 25933 25999 26113 26251 26263 26683 26701 26713 26731 26863 26881 26893 26953 27061 Columns 436 through 450 27109 27241 27283 27409 27481 27529 27541 27583 27691 27739 27751 27793 27919 27943 28099 Columns 451 through 465 28111 28183 28279 28309 28351 28411 28549 28573 28621 28663 28753 29023 29131 29209 29389 Columns 466 through 480 29401 29569 29671 29761 29881 30013 30091 30139 30271 30391 30469 30493 30559 30841 30853 Columns 481 through 495 30871 31081 31123 31153 31183 31249 31321 31393 31513 31543 31723 31729 31771 31849 32029 Columns 496 through 510 32059 32119 32143 32191 32299 32323 32371 32413 32443 32533 32563 32611 32719 32803 32833 Columns 511 through 525 32911 32941 32971 33073 33151 33181 33289 33331 33349 33589 33601 33619 33751 33769 33811 Columns 526 through 540 33829 34033 34129 34159 34213 34261 34303 34369 34471 34501 34513 34591 34651 34759 34843 Columns 541 through 555 34849 34963 35053 35083 35281 35449 35509 35533 35593 35731 35803 35839 35899 36013 36109 Columns 556 through 570 36343 36469 36529 36781 36793 36901 36931 37021 37201 37309 37339 37363 37549 37573 37591 Columns 571 through 585 37693 37783 37813 37993 38239 38329 38449 38461 38569 38611 38653 38671 38713 38749 38923 Columns 586 through 600 39043 39163 39229 39241 39343 39373 39511 39829 39841 40039 40129 40153 40429 40531 40639 Columns 601 through 615 40699 40849 41143 41179 41203 41233 41389 41413 41521 41611 41761 41851 41959 41983 42019 Columns 616 through 630 42073 42181 42223 42283 42409 42463 42571 42643 42703 42841 42901 43051 43321 43399 43543 Columns 631 through 645 43579 43609 43651 43783 43789 43891 43963 44029 44089 44131 44203 44269 44281 44383 44533 Columns 646 through 660 44623 44701 44773 45121 45139 45181 45319 45343 45589 45823 46051 46093 46183 46273 46309 Columns 661 through 675 46351 46441 46591 46681 46771 46819 46831 47059 47149 47353 47389 47419 47659 47701 47713 Columns 676 through 690 47743 47779 47809 48121 48313 48409 48481 48541 48649 48679 48733 48781 48823 48859 48871 Columns 691 through 705 48991 49033 49123 49171 49201 49279 49333 49369 49393 49411 49531 49549 49669 49741 49789 Columns 706 through 720 49921 49939 49993 50023 50053 50131 50263 50461 50551 50593 50893 50971 51061 ...

### Community Treasure Hunt

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

Start Hunting!